GefProcActions.DuplicateAction (method)

Duplicates the indicated action.
Syntax: Set GefProcAction = object.DuplicateAction ( SrcIndex )
Parameters:
SrcIndex As long -
Description: The new action will be placed at the end of the collection.

Example:

Sub GefProcActions_DuplicateAction()
    
    Dim oCimObj As GefObject
    Dim oCimProceduresObj As GefProcedures
    Dim oCimProcedObj As GefProcedure
    Dim oCimProcAct As GefProcActions
    
    Set oCimObj = CimGetObject
    Set oCimProceduresObj = oCimObj.Procedures
    If oCimProceduresObj.Count > 0 Then
        Set oCimProcedObj = oCimProceduresObj.Item(0)
        Set oCimProcAct = oCimProcedObj.Actions
        If oCimProcAct.Count > 0 Then
            oCimProcAct.DuplicateAction 0
            MsgBox "The first action was duplicated"
        Else
            MsgBox "There are no actions so the " & _
                "action cannot be duplicated"
        End If
    Else
        MsgBox "The object does not have any procedures"
    End If
    
End Sub