GefProcedure.Duplicate (method)

Creates a duplicate of the procedure.
Syntax: Set GefProcedure = object.Duplicate ( NewName, DestContainer )
Optional NewName As String -
Optional DestContainer As GefProcedures -
Description: If NewName is specified that name will be used as the base name for the duplicate.


Sub GefProcedure_Duplicate()
    Dim oCimObj As GefObject
    Dim oCimProcedure As GefProcedure
    Dim oCimProcActs As GefProcActions
    Dim oCimNewProc As GefProcedure
    Set oCimObj = CimGetObject
    Set oCimProcedure = oCimObj.Procedures.Item(0)
    oCimProcedure.Name ="MyProcedure"
    Set oCimNewProc = oCimProcedure.Duplicate("MovedProcedure", oCimProcedure.Parent)
End Sub