Extending product function with VBA > System Architect collections > OfCollection class > Add
  
Add
Adds a diagram or definition object to the property list.
Syntax
OfCollection Object.Add(Item[, Before[, After]]
Parameters
OfCollection Object
Use: Required
Data type: Object
Any instantiated OfCollection class
Item
Use: Required
Item is a Diagram, Definition or Symbol object, or fully qualified name.
If a name is supplied then the item, if diagram or definition, is created as part of this action.
Before
Use: Optional (cannot be set if After parameter is already set)
Data type: Long
Number of diagram or definition object in collection object count after which the new diagram or definition object will be added.
After
Use: Optional (cannot be set if Before parameter is already set)
Data type: Long
Number of diagram or definition object in collection object count before which the new diagram or definition object will be added.
Example
Dim i As Integer, oDef As Definition, coll As OfCollection
Set coll = oDef.GetPropertyAsCollection("Location Types")
coll.Add Chr(34) & "Regional Office" & Chr(34)
coll.SetProperty
oDef.Save
See also
OfCollection class