Extending product function with VBA > The System Architect object model > Object model classes > Diagram class > Diagram class: Methods > GetPropertyAsCollection
  
GetPropertyAsCollection
Some properties define relationships with other properties. For example a Process Chart refers to a Process Thread through its "Process Thread" property. This method returns a collection of OneOf and ListOf diagrams or definitions.
Parameters
Data type: OfCollection
Often the real name of a property is not the same as what shows up on a definition dialog; for example, in an Elementary Business Process of a Process Chart diagram, the Locations property is actually a rename - the real property is Location Types. You would only know this if you looked up the definition of an Elementary Business Process in saprops.cfg and saw that the property is actually called Location Types but has been labeled Locations:
Property "Location Types" { Edit Listof "Location" Label "Locations" LENGTH 2000 HELP "Supporting Location Types (Matrix)" READONLY }
Syntax
Diagram Object.GetPropertyAsCollection(PropName)
Parameters
Diagram Object
Use: Required
Data type: Object
Any instantiated Diagram 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.GetFilteredDiagrams("", GTCATPROCESSFLOW).IsMoreThan(i)
i = i + 1
Dim ThreadColl As OfCollection
Set SADiag = sa.Encyclopedia.GetFilteredDiagrams("", GTCATPROCESSFLOW).Item(i)
Set ThreadColl = SADiag.GetPropertyAsCollection("Process Thread")
Loop
See also
Diagram class: Methods