
TeledyneLeCroy SASVScriptEngineObject
124 AutomationAPIforTeledyneLeCroySAS/SATAProtocolSuite
IVScriptEngine::SetScriptVar
HRESULT SetScriptVar (
[in] BSTR var_name,
[in] VARIANT var_value )
Allowsyoutosetthevalueofsomeverificationscriptglobalvariablebefore/after
executingthescript(refertotheSASTracerVerificationScriptEngineManualandtheFile
BasedDecodingManualforinformationonhowascriptcandeclare,set,anduseglobal
variables).
Onlyintegers,strings,orarraysofVARIANT sareallowedascorrectvalues.Arraysof
VARIANTsareconvertedintolistvaluesinsideofscripts.SeetheFi leBasedDecoding
Manualformoredetailsaboutlistobjects.
Parameters
var_name Stringprovidingthenameoftheglobalvariableusedinthe
runningverificationscript
var_value VARIANTvariablecontainingthenewvariablevalue
ReturnValue
E_PENDING Ifthismethodiscalledwhenthescriptisalreadyrunning
Remarks
Thisfunctionallowsyoutosetinternalscriptvariablesbeforerunningascript,givingyou
theopportunitytomakerun‐timecustomizationfromCOM/Automationclient
applications.
Forthisoperationtotakeeffectduringexecutionofthescript,aglobalvariablewiththe
namespecifiedbyvar_nameshouldbedeclaredbythescript.
Example
C++:
// This example uses wrapper functions provided by the
#import directive.
ISASTrace* sas_trace;
. . .
ISASVerificationScript* sas_vscript = NULL;
sas_trace->QueryInterface( IID_ISASVerificationScript,
(void**)&sas_vscript ) )
assert( sas_vscript != NULL );
IVScriptEngine* sas_vsengine = NULL;
sas_vsengine = sas_vscript ->
GetVScriptEngine("Test_1");
assert( sas_vsengine != NULL );
Comentarios a estos manuales