Teledyne-lecroy SAS_SATA Tracer_Trainer Automation API Manual Manuel d'utilisateur Page 84

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 94
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 83
LeCroy Corporation Automation API for SAS/SATATracer/Trainer Manual Version 1.11
84
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, the 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
fileToOpen = ThisWorkbook.Sheets("Sheet1").Cells(1, 2)
Set Trace = SASTracer.OpenFile( fileToOpen )
Set IVScript = Trace ' Get the IfcVerificationScript interface.
Set VSEngine = IVScript.GetVScriptEngine( ScriptName )
' "Subscribe" for receiving VSE events.
' The X variable (an instance of VSEngineEventsModule class) handles them.
Set X.VSEEvents = VSEngine
...
VSEngine.Tag = 12 ' Assign a tag for VSE object.
VSEngine.RunVScript ' Run verification script.
Set X.VSEEvents = Nothing ' "Unsubscribe" for receiving VSE events.
Set VSEngine = Nothing ' Release external
Set IVScript = Nothing ' objects.
End Sub
Vue de la page 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 93 94

Commentaires sur ces manuels

Pas de commentaire