Connect Command Syntax Elements

 

Command Syntax

The following table outlines the use of syntax of the command format.

Syntax Description Example
<IndividualValues> Descriptions of individual values for parameters that must be specified are enclosed in angle brackets. <Value>
This example indicates that a single value is entered, the command description will provide more detail of what the value can be, for example: a real number between 0.0 and 99999.9.

If a command calls for a numeric value and text is entered instead, the value will generally be interpreted as zero.

{Options} Values surrounded by curly brackets indicate a choice between any number of available parameters. {ColorName | ColorNumber}
To indicate the color of something, you can use either the ColorName OR the ColorNumber, but not both.
{Option | Option} Bars are used between options to indicate OR. {Primary | Secondary | Compute}
In this example, enter the word Primary OR Secondary OR Compute.
{<Value> | "StartTime" "StopTime"}
In this example, the options are <Value> OR "StartTime" AND "StopTime".
[OptionalValues] Values surrounded by square brackets indicate optional parameters. These options can be used in addition to the required parameters but are not required. {SphereOption1} <Value1> [<WindowID>]
In this example, you must specify {SphereOption} and <Value> pair and you may specify <WindowID>.
{Option [|] Option} Square Brackets around a Bar indicates AND/OR. {<Name> [|] "StartTime"}
In this example enter, <Name> OR "StartTime" OR <Name> AND "StartTime"
[OptionalValues...] Ellipses indicate that multiple values of the same type may be entered. Values surrounded by square brackets indicate optional parameters. These options can be used in addition to the required parameters but are not necessary. {SphereOption1} <Value1> [{SphereOption2} <Value2>...]
In this example, you must specify one {SphereOption} <Value> pair and you may optionally specify any number of additional {SphereOption} <Value> pairs.
({Option} <Value>) Parenthesis indicate multiple entries that are always entered together.
This syntax is often used with the ellipses to indicate that any number of the entries within the parenthesis can be entered for a command.
({CommOption} <Value>)...
In this example, you can specify multiple {CommOption} <Value> entries.
"<ValuesInQuotes>" The value entered must be enclosed in double quotation marks. "<FilePath>"
This example indicates that a file path must be entered, and the value must be enclosed in double quotation marks. For example: "c:/Temp/MyFile.txt"

 

Case Sensitivity

STK Class Names are case-sensitive (e.g. Application, Facility, Sensor).

Command names and almost all command parameters are case-insensitive. If a parameter is case-sensitive this will be stated in the command description.

 

Object Names

Object Names can not be more the 64 characters in length.

Object Names can contain only alphanumerics, underscores and hyphens.

STK Object Names, in Connect, are not case-sensitive, however Class names are case-sensitive.

An Object Name can not be "_Default" or "end" (regardless of case), as these are reserved words in STK.

 

Specifying Paths
PathType Description Examples
<ApplicationPath>

The <ApplicationPath> is the path to the instance of the current Application. The format for this is:

/Application/<AppName>

where <AppName> is the Application name, e.g. STK, NTK, etc.

Since only one Application can be opened at a time, the <ApplicationPath> can also be abbreviated to simply: /

/Application/STK
/
<ScenarioPath>

The <ScenarioPath> is the path to the instance of the current Scenario. It is represented by:

Scenario/<ScenName>

where <ScenName> is the Scenario name.

Since only one Scenario can be opened at a time, the Scenario path or name can also be represented by a wildcard character, * (asterisk), which indicates the currently loaded scenario.

Scenario/stkDemo
Scenario/*
*
<ObjectPath>

The <ObjectPath> is the path to an object instance in the current Scenario. It's format is:

Scenario/<ScenName>/<ObjectClass>/<InstanceName>

The <ObjectClass> is a valid STK object e.g. Satellite, Facility, CoverageDefinition. The <InstanceName> is the name of the particular instance of the object.

To obtain the path of a child of an object, simply append the /<ObjectClass>/<InstanceName> of the child to the end of the path.

The Scenario/<ScenName> portion of the object path can be abbreviated with a wildcard character (*).

Scenario/stkDemo/Satellite/espSat
*/Satellite/espSat
Scenario/stkDemo/Satellite/espSat/Sensor/testSens
*/Satellite/espSat/Sensor/testSens
<TruncObjectPath> The <TruncObjectPath> is an <ObjectPath> without the Scenario specified. Satellite/espSat
Satellite/espSat/Sensor/testSens
Facility/Facility1
"<FilePath>" This is a complete filepath and filename. If the file is being read, it should indicate a valid, existing file. The "<FilePath>" is always enclosed in quotes, since it could contain spaces. "c:\stk62DB\Dev\testFile.aem"
"C:\Program Files\AGI\STK\6.0\STKData\VO\Models\Air\aircraft.mdl"

 

Wildcards in Object Paths

The wildcard character (*) can be used in an <InstanceName> in a Connect <ObjectPath>. The wildcard can only be used in the <ObjectPath> for which the command is being sent, it can not be used in an <ObjectPath> (or <TruncatedPath>) that is one of the command parameters, except where explicitly stated in a command's documentation.

The wildcard character can not be used in any <ObjectClass> name.

If the wildcard is used in a command returns data, the returned data for each object represented by the path, will be separated with a keyword, MDATA@DataLength@, where DataLength is the number of characters in the returned data for that object.

The wildcard should not be used with commands that write to a file. Only one file will be written and it will contain the data for the last path found.

When a command is entered using a wildcard in the <ObjectPath>, the path is expanded into all possible instances and the command is called for each instance. If any of the commands Nack, then a Nack will be returned, even though some commands may have completed successfully. To have the command ignore Nacks and continue processing use the ConControl / WildcardIgnoreNacksOn command.

Some examples follow:

*/Satellite/GPS*
The command with this path will affect all Satellites whose name begins with "GPS".

Scenario/stkDemo/Satellite/espSat/Sensor/*Test
The command with this path will affect all Sensors, on the Satellite espSat, whose name ends with "Test"

Scenario/stkDemo/Satellite/Sat*/Sensor/*
The command with this path will affect all Sensors on all Satellites whose name begins with "Sat".

*/Satellite/*/Sensor/*
The command with this path will affect all Sensors on all Satellites.

 

Common Graphics Options

The following table outlines some of the common graphics options used in Connect commands.

Option Description Examples
Color Colors in Connect commands can be entered in four different ways described here:
  • {ColorName} choices are limited to those specified in your _Default.ap file.
  • <ColorNumber> is the numeric value corresponding to the color's position in the color list in your _Default.ap file. If <ColorNumber> is specified and no color is found to match the entered value, the first color specified in the color list is used.
  • %RRRGGGBBB is the decimal representation of a color. Each component of the RGB must be in the range of 0 to 255. If a number larger that 255 is entered for any component, that component is clamped to 255. Any number of characters can be input. The string will be filled with zeros for missing values.
  • #RRGGBB is the hexadecimal representation of a color. Each component of the RGB must be in the range of 00 to ff. Any number of characters can be input. The string will be filled with zeros for missing values.
Below are the four different ways to indicate the color red:
 
red
6
%255000000
#ff0000
LineStyle Line styles in Connect commands can be entered as the line style name, or the line style number:
  • {LineStyleName} choices are limited to those specified in your _Default.ap file. Default values included with STK include: Solid, Dashed, Dotted, Dot, Long, SDash, MDash, LDash, DashDot, MDashDot, LDashDot, MSDash, LSDash, LMDash, LMSDash. Generally S indicates Short, M indicates Medium and L indicates Long.
  • <LineStyleNumber> is the numeric value corresponding to the Line style's position in the line style list in your _Default.ap file. O indicates Solid, 1 for Dashed, 14 for LMSDash, etc.
LineStyle dotted
LineStyle Solid
LineStyle 7
FillStyle Fill styles in Connect commands can be entered as the fill style name, or the fill style number:
  • 0 Solid
  • 1 VerticalStripe
  • 2 HorizontalStripe
  • 3 DiagStripe1
  • 4 DiagStripe2
  • 5 Hatch
  • 6 DiagHatch
  • 7 Screen
FillStyle VerticalStripe
FillStyle 3
FillStyle Solid

 

VGT, Time, Calculation, and Spatial Component Specification

Use the following syntax when entering a VGT, Time, Calculation, or Spatial Analysis component in Connect.

A component instance:

"<TruncObjectPath> <ComponentName> {ComponentType}"

A template:

"<ClassName> <ComponentName> {ComponentType}"

The following table describes the elements of the specification.

Element Description Example
<TruncObjectPath> A truncated object path, Central Body path or Access object path.

To specify an Access object path the syntax is:
"Access/<FromObj>-To-<ToObj>"

Where the <FromObj> and <ToObj> are comprised of the <ObjectClass>-<ObjectName> hierarchy.

Facility/Facility1
Satellite/Satellite1/Sensor/Sn45
CentralBody/Moon
Access/Facility-ScenTestFac-To-Satellite-ScenTestSat
<ClassName> STK object class name; used when specifying a template. Satellite
GroundVehicle
Receiver
<ComponentName> The name of the component or template. EphemerisTimeSpan
Body.Origin
{ComponentType} The type of component or template. Valid values for VGT {ComponentType}:
  • Angle
  • Axes
  • Plane
  • Point
  • System
  • Vector
Valid values for Time {ComponentType}:
  • Time Instant
  • Interval
  • Interval List
  • Collection of Interval Lists
  • Time Array
Valid values for Calculation {ComponentType}:
  • Scalar Calculation
  • Condition
  • Parameter Set
Valid values for Spatial Analysis {ComponentType}:
  • Spatial Calculation
  • Spatial Condition
  • Volume Grid

NOTE: In many Connect commands the {ComponentType} is implied by the command and need not be entered, but it is good practice to always include the {ComponentType}.

Component Instance Example Description
"Satellite/MultSelTest EphemerisTimeSpan Interval" The ephemeris time span interval for the satellite MultSelTest
"Satellite/MultSelTest AvailabilityIntervals.Span.Start Time Instant" The embedded availability start time instant of the Satellite
"Satellite/ScenTestSat/Sensor/ScenSatSn Center Point" The center point of the Sensor
"Satellite/ScenTestSat GroundTrajectory Parameter Set" The satellite's ground trajectory parameter set.
"Satellite/ScenTestSat GroundTrajectory.Detic.LLA.Altitude Scalar Calculation" The embedded Altitude scalar of the satellite's ground trajectory parameter set.
"CentralBody/Earth SunRA Angle" The Earth SunRA angle.
"Access/Facility-ScenTestFac-To-Satellite-ScenTestSat-Sensor-TestSn1 AccessIntervals.First Interval" The first access interval of the access between ScenTestFac and the TestSn1 Sensor.

NOTE: Where a Connect command requires a template specification a Central Body component can also be used.

Template Example Description
"Satellite EphemerisEpoch Time Instant" The ephemeris epoch time instant template for a Satellite
"Sensor Boresight Vector" The boresight vector template for a Sensor

 

Date/Time Options

When entering a single Time Value or Epoch enter one of the following:

Single Time Description Example
"<DateTime>" Enter the time using the current Connect Date units. Connect Date unit set to UTCG:
"01 Sep 2011 12:00:00.000"
Connect Date unit set to YYDDD.DDD:
"11244.50000"
"<TimeInstantComponentSpec>" Enter a time instant component.
The syntax is "<TruncPath> <Name> Time Instant"
where <TruncPath> is an object truncated path and <Name> is the name of the time instant.
"Satellite/Satellite1 EphemerisTimeSpan.Start Time Instant"
"Missile/Missile1 EphemerisEpoch Time Instant"
"{TimeConstant}" Enter a time constant. Valid values are Today, Tomorrow, Now, UseAnalysisStartTime, UseAnalysisStopTime.
Today and Tomorrow represent midnight (local time) of the current or next day.
Now will set the time to the current system time.
UseAnalysisStartTime is the Scenario's analysis time period start.
UseAnalysisStopTime is the Scenario's analysis time period stop.
"Tomorrow"
"Now"
"UseAnalysisStartTime"

The following are examples of valid specifications for entering a single Time or Epoch:

When entering a Time Interval enter one of the following:

Time Interval Description Example
UseScenarioInterval Enter the keyword to set the time interval to the Scenario's Analysis Interval. UseScenarioInterval
"<TimeIntervalComponentSpec>" Enter a time interval component, which represents a start and stop time.
The syntax is "<TruncPath> <Name> Interval"
where <TruncPath> is an object truncated path and <Name> is the name of the time interval.
"Scenario/Scenario1 AvailabilityIntervals.Span Interval"
"Missile/Missile1 EphemerisTimeSpan Interval"
"<StartTime>" "<StopTime>" Enter a start time and a stop time. The times must be entered in order, and need not be the same format. See table below for formats for "<StartTime>" "<StopTime>"

The following formats are available for entering "<StartTime>" and "<StopTime>".

"<StartTime>" or "<StopTime>" Description Example
"<DateTime>" Enter the time using the current Connect Date format. Connect Date unit set to UTCG:
"01 Sep 2011 12:00:00.000"
Connect Date unit set to GPSTime:
"1651:234315.000"
"<TimeInstantComponent>" Enter a time instant component, which represents a single time.
The syntax is "<TruncPath> <Name> Time Instant"
where <TruncPath> is an object truncated path and <Name> is the name of the time instant.
"Satellite/Satellite1 EphemerisTimeSpan.Start Time Instant"
"Scenario/Scenario1 AnalysisStartTime Time Instant"
"{TimeConstant}" Enter a time constant. Valid values are Today, Tomorrow, Now, UseAnalysisStartTime, UseAnalysisStopTime.
Today and Tomorrow represent midnight (local time) of the current or next day.
Now will set the time to the current system time.
UseAnalysisStartTime is the Scenario's analysis time period start.
UseAnalysisStopTime is the Scenario's analysis time period stop.
"Today"
"UseAnalysisStopTime"
"+n {Unit}" Enter a time increment. This is valid for "StopTime" only and defines a length of time that is added to the Start time.

where n is an integer, and {Unit} can be any of the following: Day, Days, Hour, Hours, Hr, Hrs, Min, Mins, Minute, Minutes, Sec, Secs, Second, Seconds

"+1 day"

The following are examples of valid specifications for Time Interval.

For more information on dates, see the Scenario Units of Measure section in STK Help.

 

Report Style Names

This section describes how to specify the "<StyleName>" for the Style {Option} for the various report and graph commands. The syntax for the "<StyleName>" is:

"[{My Styles | Installed Styles}/][<Directory>/]<StyleName>"

Or

"<FilePath>/<StyleFileName>"

The following table describes the different style specifications. In the table:

ScenarioDir is the current Scenario directory
UserDir is <STKConfig>/Styles/<ClassName>
InstallDir is <STKInstall>/Styles/<ClassName>
"<StyleName>" Description
"<StyleName>" This is the most common method. Enter the Style Name as it appears in the UI. STK will look for the style in the ScenarioDir, then in the UserDir and then in the InstallDir.

For example: "Beta Angle"

"<Directory>/<StyleName>" Enter the Style Name preceded by a sub directory name. STK will look for the style in ScenarioDir/<Directory>, then in UserDir/<Directory> and then in InstallDir/<Directory>.

For example: "New Project/Beta Angle"

"My Styles/<StyleName>" STK will look for the style in the UserDir.

For example: "My Styles/Beta Angle"

"My Styles/<Directory>/<StyleName>" STK will look for the style in UserDir/<Directory>

For example: "My Styles/New Project/Beta Angle"

"Installed Styles/<StyleName>" STK will look for the style in the InstallDir.

For example: "Installed Styles/Beta Angle"

"Installed Styles/<Directory>/<StyleName>" STK will look for the style in InstallDir/<Directory>

For example: "Installed Styles/New Project/Beta Angle"

"<FilePath>/<StyleFileName>" Enter the full path and file name for the style file. STK will look for the file specified.

For example: "C:\MySTK\Config\Styles\Satellite\New Project\Beta Angle.rst"

 

Other Syntax Notes

The following table describes various notes the user may want to keep in mind when using Connect Commands.

Name Description Example
Keyword-Value Pairs Many connect commands use the Keyword-Value pair syntax to allow users to input a variable number of options on the command line. If however the user enters a Keyword-Value pair more than once, only the last instance of the Keyword value will be used. VO */Satellite/Satellite1 Model Color red Color yellow
In this simple example the Color will be set to yellow for the model, not red.

 

 

STK Programming Interface 11.0.1