Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 134

Advertising
background image

Teledyne LeCroy

SASVScriptEngine Object Events

128

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

VS_RESULT res = SCRIPT_NOT_FOUND;
try
{
res = (VS_RESULT)vscript_engine ->RunVScript();
}
catch (_com_error& er)
{
SetStatusError( er );
}

// Tear connection with the test case.
vse_sink.Unadvise( vscript_engine );

...
VBA: ( MS Excel )

Public SASTracer As SASAnalyzer
Public Trace As SASTrace
Public GVSEngine As VScriptEngine

' VSEngineEventsModule is a special class implementing

VSE event

' handlers.
' It should have, in the global declaration section, a

line like this:

' Public WithEvents VSEEvents As VScriptEngine

Dim X As New VSEngineEventsModule

Private Sub RunVScritButton_Click()

Dim VSEngine As VScriptEngine
Dim IVScript As ISASVerificationScript
Dim ScriptName, fileToOpen As String

ScriptName = ThisWorkbook.Sheets("Sheet1").Cells(2, 2)

If SASTracer Is Nothing Then
Set SASTracer = New SASAnalyzer

If SASTracer Is Nothing Then
MsgBox "Unable to connect to SASTracer",

vbExclamation

Exit Sub
End If
End If

Advertising