For reference-type properties, this method obtains a collection of objects such as Diagram or Definition for the referenced items.
They are opened for update if the Encyclopedia property OpenObjectsAsReadOnly is set to False.
The type of this Class is OfCollection.
Example script to list contents
Dim oc As OfCollection Dim def as Definition Dim def2 as Definition Dim bOldRO as Boolean
' Remember old setting bOldRO = sa2001.Encyclopedia.OpenObjectsAsReadOnly
' obtain def by id for instance sa2001.Encyclopedia.OpenObjectsAsReadOnly = True ' set desired mode of access Set def = sa2001.Encyclopedia.GetDefinitionById(100) sa2001.Encyclopedia.OpenObjectsAsReadOnly = bOldRO ' restore old setting set oc = def.GetPropertyAsCollection("Attributes") For Each def2 in oc debug.print def2.Name Next
Example script to store contents
Dim oc As OfCollection Dim def as Definition Dim bOldRO as Boolean
' Remember old setting bOldRO = sa2001.Encyclopedia.OpenObjectsAsReadOnly
' obtain def by id for instance sa2001.Encyclopedia.OpenObjectsAsReadOnly = False ' set desired mode of access Set def = sa2001.Encyclopedia.GetDefinitionById(100) sa2001.Encyclopedia.OpenObjectsAsReadOnly = bOldRO ' restore old setting Set oc = objDef.GetPropertyAsCollection("itself") oc.Clear oc.Add objDef oc.SetProperty def.Save