Extending product function with VBA : The System Architect object model : Object model classes : Definition class : Definition class: Methods : GetPropertyAsCollection
  
GetPropertyAsCollection
Some properties define relationships with other properties. For example an Entity Definition refers to Attributes through its Description property. This method returns a collection of OneOf and ListOf diagrams or definitions.
Often the real name of a property is not the same as what shows up on a definition dialog; for example, in a Service Time Profile, the Time Units property is actually a rename - the real property is Duration Time Units. You would only know this if you looked up the definition of a Service Time Profile in saprops.cfg and saw that the property is actually called Duration Time Units but has been labeled Time Units:
PROPERTY "Duration Time Units" { EDIT Text LISTONLY List "Time Units" LABEL "Time Units" DEFAULT "Hour" LENGTH 20 READONLY }
Syntax
Definition Object.GetPropertyAsCollection(PropName)
Parameters
Definition Object
Use: Required
Data type: Object
Any instantiated Definition class
PropName
Use: Required
Data type: String
The name of the property as seen in the saprops.cfg
Example
Dim i As Long, DiagId As Long
i = 0
Do While sa.Encyclopedia.GetFilteredDefinitions("", DFXACTIVITY).IsMoreThan(i)
i = i + 1
Dim AttribColl As OfCollection
Set SADef = sa.Encyclopedia.GetFilteredDefinitions("", DFXACTIVITY).Item(i)
Set AttribColl = SADef.GetPropertyAsCollection("Description")
Loop
See also
Definition class: Methods