AddByType function (automation interface)
Syntax:
AddByType("<object type>", "<association>")
Where:
The AddByType function creates an object of a specified type through a specified association and returns the new object.
Examples
To create a Call Behavior Action (Action Node) for an Activity through the ACTIVITYNODE association:
Set objItem = Dictionary.Item("Activity", "Activity1")
Set NewNode = objItem.AddByType("Action Node", "ACTIVITYNODE")
NewNode("NODETYPE") = "Call Behavior Action"
To create an Atomic State (State) for a State Machine through the OWNEDSTATE association:
Set objItem = Dictionary.Item("State Machine", "State Machine1")
Set NewNode = objItem.AddByType("State", "OWNEDSTATE")
NewNode("UMLSTATETYPE") = "Atomic"