Using the Scripting Tool

The Scripting Tool utility is available from the Utilities menu. You can use it to examine the Ansys Orbit Determination Tool Kit (ODTK®) object hierarchy and to execute Javascript code as a means for prototyping.

 

Executing scripts

In the blank text space of the Scripting Tool, you can write Javascript code. You have the following options available on the right:

Option Description
Execute Click this button to execute the code that you have in the text box.
Save As Click this button to save the code you wrote to a JS file in the directory of your choice.
Clear Click this button to erase all the code you have in the text box.
Load Click this button to load a JS file of your choice into the text box.
Scripting Help Click this link to go to the Scripting Attributes section of the ODTK Help.

Accessing subobjects

Starting with the ODTK root object, each object provides access to its subobjects via the Children scope. The following image demonstrates four steps of how to access the attribute path of a scenario and see its subobjects.

As a side effect of the ODTK application supporting various languages, there is more than one way to get access to the same object. For instance, you could refer to "Sat1" in the following ways:

COM

Cross-Platform API

 

Use Children to test if there are any objects, and then use class name to access them. For example, to display the names of each of the satellites in your scenario, you could use the following:

COM

Cross-Platform API