2 itrace::applydisplayoptions, Applies the specified display options to the trace, Parameters – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual
Page 35: Return values, Remarks, Example, Itrace::applydisplayoptions
![background image](/manuals/353556/35/background.png)
Teledyne LeCroy
Automation API for PETracer/PETrainer
30
4.1.2 ITrace::ApplyDisplayOptions
HRESULT ApplyDisplayOptions (
[in] BSTR do_file_name )
Applies the specified display options to the trace.
Parameters
do_file_name
String providing the full pathname to the display options file
Return values
ANALYZERCOMERROR_UNABLELOADDO
Unable to load the display options file
Remarks
Use this method if you want to filter traffic of some type in the recorded or opened trace.
The display options file is the file with extension .opt created by the PETracer™ application. You can
create this file when you select “Setup -> Display Options…” from the PETracer application menu, change the
settings in the “Display Options” dialog box, and then select the “Save…” button.
Note: This does not work on Multisegment traces
Example
WSH:
Set Analyzer = WScript.CreateObject( “CATC.PETracer” )
CurrentDir = Left( WScript.ScriptFullName, InstrRev( WScript.ScriptFullName, “\” ) )
Set Trace = Analyzer.MakeRecording( CurrentDir & "Input\test_ro.rec" )
Trace.ApplyDisplayOptions CurrentDir & "Input\test_do.opt"
Trace.Save CurrentDir & "Output\saved_file.pex"
C++:
IPETrace* pe_trace;
TCHAR file_name[_MAX_PATH];
. . .
try
{
pe_trace->ApplyDisplayOptions( file_name );
}
catch ( _com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("PETracer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), _T("PETracer client"), MB_OK );
return 1;
}