Scripting For Attributes

This section describes how to get attribute information using the ODTK GUI and how to access and compose scripts to interact with those attributes outside of the GUI. It also includes a short description of some general attribute properties.

The following are links to descriptions and samples of how to use COM and API code to enact attributes within ODTK.

General attribute properties

Attribute exposure

The items below are all possible properties of attributes, and you can use them in both COM and Cross-platform APIs.

Property Description
Hidden The attribute is hidden from you in the WhitePanel view but is available for scripting commands, and ODTK will save it into the scenario file.
Transient The attribute is not a part of the Attribute hierarchy and will NOT be saved into scenario file. It was likely added as a temporary by a script or it was deprecated.
Transparent The attribute is not a part of the Attribute hierarchy and will NOT be saved into scenario file. It was likely added as a temporary by a script or it was deprecated.
HasDependents The presence of this property indicates that if you change it, notification will go to other attributes, and they may change as well. You must use the TestProp("HasDependents") method for this.

You can expose these properties using the following methods:

  • GetProp("Hidden")
  • GetProp("Transient")
  • GetProp("Transparent")
  • TestProp("HasDependents")

TestProp("PropName") checks if a property is present and returns a Boolean. GetProp("PropName") returns the value of the property (string, int, double, list, etc.).

Here are some usage examples:

  • alert scen.Satellite(0).MotionModel.TestProp("HasDependents").value
  • alert scen.Satellite(0).OrbitState.GetProp("Hidden").value
  • alert scen.Satellite(0).Position.GetProp("Hidden").value

Other attribute properties

The “ReadOnly” property is set for attributes and properties that you should not change. “Fixed” indicates that you cannot change an attribute scope structure, and you cannot rename or alias variables.