Component Browser Connect

The Component Browser has a Connect command structure that is similar to Communications and Astrogator. This topic describes the command syntax for the Component Browser and explains how to retrieve the range of attributes and values that you can modify 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. Build the commands 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 attribute you want to perform it on. Each of these blocks is comprised of smaller elements, as explained in detail in the sections below. Each discussion of the syntax blocks includes 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 (1) the operation that it will perform when it executes and (2) the location, which is always the STK scenario, of the targeted object. Here is the reference example with the command block 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. You must separate each from the others by a single blank space:

<Prefix> {Scenario Path} <Operator>

Prefix

The prefix defines which type of object or property you are going to interact with. Use the prefix ComponentBrowser_RM with the GetValue operator and use the prefix ComponentBrowser with the other operators.

Here is the reference example with the prefix 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, */. Here is the reference example with the object path 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. The following operators are available for Component Browser Connect commands:

Operator Description
SetValue Use this to set the value specified in the <Value> pointed to by the <AttributePath>.
GetValue Use this to get the value(s) pointed to by the <AttributePath>. If an attribute is not specified, the command returns all of the attributes for the entire component. If you do not specify a component, the command returns all of the components for the entire library. If you do not specify a library, the command returns all of the libraries available to the Component Browser.
Duplicate Use this to create a copy of an existing component.
Rename Use this to rename a user-created component.
Delete Use this to delete a user-created component.
AddItem Use this to add a user-created component. Before using this operator, you must apply the Duplicate operator to copy an existing component to create the component you want to add.

Here is the reference example with the operator 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 on the individual attribute. You must separate the component library and component name from surrounding command elements by spaces and enclose them in quotes if the name contains any spaces. If the targeted attribute is subordinate to other attributes of the component, then you should name those parent attributes in hierarchical order, separated by periods. If any parent attribute contains a space, then you must enclose the entire chain in quotes.

Here is the reference example with the attribute path 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.

Here is the reference example with the attribute, value, and unit 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 you can use to retrieve information about them: Properties, Choices, and Size. You should place these properties 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 the 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"

For the "Scattering Point Provider List" attribute, this duplicates the list called "Scattering_Point_Provider_List" and names the copy "MyPPL":

ComponentBrowser */ Duplicate "Scattering Point Provider List" Scattering_Point_Provider_List MyPPL

Adds a new item to the MyPPL scattering point provider list (you must do the previous Duplicate operation first):

ComponentBrowser */ AddItem "Scattering Point Provider List" MyPPL PointProviderList