Property Script Commands
Property script commands allow you to navigate through all objects and properties in a project. You can get and set all properties for all objects in the Project tree with simple data types.
Property Object is the base class defined for all script objects that support the properties Get and Set.
GetName()
- Returns the name of the object.
GetChildTypes()
- An object may have different types of children. For example, a design may have variables, modules, and editors.
- Returns an array of text strings; may be empty if the children are not divided into different types.
GetChildNames(<type>)
- <type> – Child type name. By default, returns all children names for all types.
- Returns an array of immediate children names, belonging to a type if specified.
GetChildObject(<objPath>)
- <objPath> – A child object path; can contain multiple generations (for example, designObject/moduleObject/SetupObject).
- Returns a child property object if the object is found.
GetPropNames(<bIncludeReadOnly>)
- <bIncludeReadOnly) – Optional; defaults to true. True includes read-only properties; False excludes read-only properties.
- Returns an array of the object's property names.
GetPropValue(<propertyPath>)
- <propertyPath> – The property's path; may be a child object's path appended with a property name (for example, TeeModel/Offset/SIValue).
- Returns the property value if found. Otherwise causes script error.
SetPropValue(<propertyPath>, <data>)
- <propertyPath> – The property's path; may be a child object's path appended with a property name (for example, TeeModel/Offset/SIValue).
- <data> – New data; type depends on property type.
- Returns True if updated successfully; False if new data is invalid.
For a detailed summary of how Property script commands are used in a range of contexts, including Variable objects, see: Object Script Property Function Summary. Additional examples for these commands are listed under Project Objects, Design Objects, 3D Modeler, Optimetrics, Radiation Module and Reporter.
Older property commands should be executed by the oProject object.
Set oProject = oDesktop.SetActiveProject("Project1")
oProject.CommandName <args>
Some of the topics covered in this chapter are as follows:
Object Script Property Function Summary
Conventions Used in this Chapter