GefProcAction.GetInvokeMethod (method)

Retrieves the configuration information for the action.
Syntax: Boolean = object.GetInvokeMethod ( ObjectName, MethodName, ResulPoint, ArgumentExprs, ArgumentSetpoints )
Parameters:
ObjectName As BSTR* -
MethodName As BSTR* -
ResulPoint 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 method 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 GefActionInvokeMethod.

The arguments correspond to the fields in the action panel of the Procedure Information dialog box
Sub GefProcAction_GetInvokeMethod()
    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.GetInvokeMethod (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 method 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 InvokeMethod Action"
        End If
    End If
End Sub
See Also: SetToInvokeMethod