Using property descriptors (automation interface)
Syntax:
<object>("Property Descriptors") - returns Public property descriptors.
<object>("Property Descriptors", "Public") - returns Public property descriptors.
<object>("Property Descriptors", "Private") - returns Private property descriptors.
<object>("All Property Descriptors") - returns both Public and Private property descriptors.
When navigating through a model, it is often useful to determine what attributes (properties) and associations an object has. The Property Descriptors argument returns a string that lists the following properties of an object:
• Standard properties, such as Name and Type.
• Text tab properties.
• Tag Definition properties that have been applied to the object and its type.
The returned string contains the following information about each property:
• The name of the property.
• The role of the property, either attribute or association.
• Access to the property, either read-only (ro), read/write (rw) read-only private (rop) or read/write private (rwp).
• Multiplicity rules, 0, 0+, 1+, 1.
• A paragraph break.
If you want to return only the extended properties of an object, you can use the Extended Attribute Descriptors argument.
If you want to return the properties of an object through its type, so that you do not require an instance of an object, use the GetClassProperties or GetExtendedClassProperties function.
Example
In this example, strPropDesc is set to the description of the Public properties of Activity1:
Set objItem = Dictionary.Item("Activity", "Activity1")
strPropDesc = objItem("Property Descriptors", "Public")
An example of a returned string is as follows:
"Last Changed","Attribute","RO","1"
"Constraints","Attribute","RW","1"
"Full Name","Attribute","RO","1"
"Description","Attribute","RW","1"