Component Browser Connect

The Component Browser has a Connect command structure that is similar to Communications and Astrogator. This page describes the command syntax for the Component Browser and explains how to retrieve the range of attributes and values that can be modified using these commands.

Component Browser Connect Command Syntax

A Component Browser Connect command has three building blocks: the command block, the attribute path, and the attribute block. Commands are built in this order:

<Command><Attribute Path><Attribute>

Together, these blocks tell Connect the operation you want to perform, where you want to perform it, and what you want to perform it upon. Each of these blocks is comprised of smaller elements, as explained in detail in the sections below. As we discuss each of the syntax blocks, we will use the following command as a reference example:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

Command

The command block of a Component Browser Connect command determines the operation that will be performed when it is executed, and the location - which is always the STK scenario - of the targeted object. In our reference example, the command block is here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

There are three elements that make up the command block, each of which must be separated from the others by a single blank space:

<Prefix> {Scenario Path} <Operator>

Prefix

The prefix defines what type of object or property you are going to interact with. The prefix ComponentBrowser_RM is used with the GetValue operator, while the prefix ComponentBrowser is used with the Duplicate and SetValue operators.

In our reference example, the prefix is here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

{Scenario Path}

All components are located at the scenario, so for all Component Browser Connect commands, the object path is the scenario path, */. In our reference example, the object path is here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

Operator

The operator is the syntax element that determines the specific action that the command will execute. There are three operators used in Component Browser Connect commands:

Operator Description
SetValue Used to set the value specified in the <Value> pointed to by the <AttributePath>.
GetValue Used to get the value(s) pointed to by the <AttributePath>. If an attribute is not specified, all of the attributes for the entire component are returned. If a component is not specified, all of the components for the entire library are returned. If a library is not specified, all of the libraries available to the Component Browser are returned.
Duplicate Used to create a copy of an existing component.
Rename Used to rename a user-created component.
Delete Used to delete a user-created component.

In our reference example, the operator is here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

Attribute Path

The attribute path of a Component Browser Connect command identifies the location - within the component libraries and individual components - of the targeted attribute. The exact syntax and length of the attribute path depends upon the individual attribute. The component library and component name must be separated from surrounding command elements by spaces, and enclosed in quotes if the name contains any spaces. If the targeted attribute is subordinate to other attributes of the component, those parent attributes should be named in hierarchical order, separated by periods. If any parent attribute contains a space, then the entire chain must be enclosed in quotes.

In our reference example, the attribute path is here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

List Indexing

For GetValue and SetValue commands, you can add an index in the Attribute Path to access the particular row of interest. For example, to get the second beam's ID in a multibeam transmitter model, you would use the Attribute Path in this command:

ComponentBrowser _RM */ GetValue "Transmitter Models" "My Multibeam Transmitter Model" Model.AntennaSystem.AntennaBeams[1].BeamID

The indexing is zero-based. Therefore, to access the second beam, you use an index of "1" in the Attribute Path; [0] is the default.

Attribute

The attribute block of a Component Browser Connect command identifies the attribute that the command will interact with, and the value and units to be set, if applicable. The attribute block is comprised of three elements:

<Attribute> <Value> [{Unit}]

The attribute element is at the end of the attribute path and is the target of the command. The value element must be a valid setting for the attribute. The unit element is optional.

In our reference example, the attribute, value, and unit are here highlighted in bold:

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin" 6370 km

Properties, Choices, and Size

There are three properties common to all attributes that can be used to retrieve information about them - Properties, Choices, and Size. These properties should be placed at the end of the attribute path, separated from the attribute by a colon (e.g., :Choices). The Properties property retrieves the currently defined values of all of the properties of the attribute. The Choices property returns a list of all possible choices for non-Boolean attributes with specific arrays of values. The Size property returns the number of rows in the attribute's list, for attributes that can have rows of values. For example, the following command retrieves the values for the diameter of the Bessel Aperture Circular antenna component:

ComponentBrowser_RM */ GetValue "Antenna Models" "Bessel Aperture Circular" Diameter:Properties

The following command uses our original reference example to retrieve the values for the Rmin attribute:

ComponentBrowser_RM */ GetValue "Central Bodies" "My Ganymede" "Shape.Oblate Spheroid.Rmin":Properties

Examples

Retrieves a list of component libraries:

ComponentBrowser_RM */ GetValue

Creates a copy of the installed central body component "Charon" with the name "My Charon":

ComponentBrowser */ Duplicate "Central Bodies" Charon "My Charon"

Retrieves the value of the SurfaceTemperature attribute of the Simple Satcom atmospheric absorption model:

ComponentBrowser_RM */ GetValue "Atmospheric Absorption Models" "Simple Satcom" SurfaceTemperature

Defines the radius of the sphere-shaped central body model "My Ganymede":

ComponentBrowser */ SetValue "Central Bodies" "My Ganymede" Shape.Sphere.R 2500000 m

Renames the "Copy of Dipole" antenna model component (the default name given to a duplicated component) to "My Dipole":

ComponentBrowser */ Rename "Antenna Models" "Copy of Dipole" "My Dipole"

Deletes the "My Earth J2" propagator component:

ComponentBrowser */ Delete "Propagators" "My Earth J2"

STK Programming Interface 11.0.1