beautypg.com

2 iuwbtrace2::exporttocsv, Iuwbtrace2::exporttocsv – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 46

background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

42

4.2.2 IUwbTrace2::ExportToCsv


HRESULT ExportToCsv(

[in] BSTR file_name,
[in, defaultvalue(-1)] long packet_from,
[in, defaultvalue(-1)] long packet_to );


Exports a trace into a text file in CSV format and allows exporting a range of packets.

Parameters

file_name

String providing the full pathname of the trace export file


packet_from

Beginning packet number when you are exporting a range of packets. A value of
–1 makes the first packet of the exported trace be the first packet of the trace.


packet_to

Ending packet number when you are exporting a range of packets. A value of –1
makes the last packet of the exported trace be the last packet of the trace.

Return values

ANALYZERCOMERROR_UNABLESAVE

Unable to export trace file

Remarks

Use this method if you want to export a recorded or opened trace into a text file in CSV format. If the
display options were applied to this trace (see IUwbTrace::ApplyDisplayOptions,
IUwbAnalyzer::LoadDisplayOptions

), then hidden packets would not be exported.


If a packet range is specified and it is invalid (for example, packet_to is more than the last packet number
in the trace, or packet_from is less then first packet number in the trace, or

packet_from

is more then

packet_to

) then packet range will be adjusted automatically.