Retrieves the configuration information for the action. | |
Syntax: | Boolean = object.GetInvokeScript ( ObjectName, EntryName, ResultPoint, ArgumentExprs, ArgumentSetpoints ) |
Parameters: |
ObjectName
As BSTR* -
EntryName As
BSTR* -
ResultPoint
As BSTR* -
ArgumentExprs As VARIANT* - Pass in an existing CoCimSafeArray3 object. It
will be filled in with an array of strings containing the
expressions used as arguments. (Note: In VBScript and VBA/VB, you
may pass a Variant and this function will return a native
array.)
ArgumentSetpoints As VARIANT* - Pass in an existing CoCimSafeArray3 object. It
will be filled in with an array of booleans indicating if the
expression contains a single point that will bet set with the value
of the output parameter after the script returns. (Note: In
VBScript and VBA/VB, you may pass a Variant and this function will
return a native array.)
|
Description: | This method is valid only if the Type of the
action is GefActionInvokeScript. The arguments correspond to the fields in the action panel of the Procedure Information dialog box. Example: Sub GefProcAction_GetInvokeScript() Dim oCimObj As GefObject Dim oCimProceduresObj As
GefProcedures Dim oCimProcedObj As
GefProcedure Dim oCimProcActs As
GefProcActions Dim oCimProcAct As
GefProcAction Set oCimObj = CimGetObject Set oCimProceduresObj =
oCimObj.Procedures If oCimProceduresObj.Count > 0
Then Set
oCimProcedObj = oCimProceduresObj.Item(0) Set
oCimProcActs = oCimProcedObj.Actions Set
oCimProcAct = oCimProcActs.Item(0) Dim
argExrArray As Variant Dim
argSetptArray As Variant Dim
methodname As String Dim
objetcname As String Dim
resultPoint As String Dim ret As
Boolean Set
argExrArray = CimCreateSafeArray() Set
argSetptArray = CimCreateSafeArray() ret =
oCimProcAct.GetInvokeScript (objetcname, methodname, _ resultPoint,
argExrArray, argSetptArray) If ret
Then Dim
low As Long Dim
high As Long Dim
cnt As Long If
argExrArray.Dimensions Then argExrArray.GetVectorBounds
low, high cnt
= high - low + 1 Else cnt
= 0 End
If MsgBox
"Object Name: " & objetcname & " Method Name: " &
_ methodname
& " Result Point: " & resultPoint & _ " Argument count: " & cnt If
cnt Then Dim
i As Long For
i = low To high Dim
argExpr As String Dim
argSetPt As Boolean argExpr
= argExrArray.Element(i) argSetPt
= argSetptArray.Element(i) MsgBox
"Argument: " & i & " Has expression: " &
argExpr If
argSetPt Then MsgBox
"When script returns if the expression is a " & _ "single
point the value of the argument will" & _ "be
used to do a setpoint" End
If Next
i End
If Else MsgBox
"Not an InvokeScript Action" End
If End If End Sub |
See Also: | SetToInvokeScript |