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 you must enter a single value. The command description will provide more detail of what the value can be, such as "a real number between 0.0 and 99999.9". If a command calls for a numeric value and you enter text instead, the value will generally be interpreted as zero. |
{Options} | Values surrounded by curly brackets indicate a choice 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. You can use these options in addition to the required parameters, but they are not required. | {SphereOption1} <Value1> [<WindowID>] In this example, you must specify both {SphereOption} and <Value>, and you have the option to specify <WindowID> or not. |
{Option [|] Option} | Square brackets around a bar indicates AND/OR. |
{<Name> [|] "StartTime"} In this example, enter <Name> OR "StartTime" OR <Name> AND "StartTime". |
[OptionalValues...] | An ellipsis indicate that you can enter one or more values of the same type. Values surrounded by square brackets indicate optional parameters. You can use these options in addition to the required parameters, but they are not necessary. | {SphereOption1} <Value1> [{SphereOption2} <Value2>...] In this example, you must specify one {SphereOption} <Value> pair, and you have the option to specify any number of additional {SphereOption} <Value> pairs. |
({Option} <Value>) | Parentheses indicate two or more entries that are always entered together. This syntax is often used with an ellipsis to indicate that you can specify any number of the entries within the parentheses 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 you must enter a file path, and the value must be enclosed in double quotation marks, for example "c:/Temp/MyFile.txt". |
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 cannot 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 cannot be "_Default" or "end" (regardless of case), as these are reserved words in STK.
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> |
<ObjectPath> is the path to an object instance in the current scenario. Its format is: Scenario/<ScenName>/<ObjectClass>/<InstanceName> <ObjectClass> is a valid STK object, e.g., Satellite, Facility, CoverageDefinition, etc. 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 12\STKData\VO\Models\Air\aircraft.glb" |
You can use the wildcard character (*) in an <InstanceName> in a Connect <ObjectPath>. You can only use the wildcard in the <ObjectPath> for which the command is being sent. You cannot use it in an <ObjectPath> (or <TruncatedPath>) that is one of the command parameters, except where explicitly stated in a command's documentation.
You cannot use the wildcard character in any <ObjectClass> name.
If you use the wildcard 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.
You should not use the wildcard 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 you enter a command 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 Satellite objectss with names beginning with "GPS".
Scenario/stkDemo/Satellite/espSat/Sensor/*Test
The command with this path will affect all Sensor objects on the Satellite espSat with names ending with "Test".
Scenario/stkDemo/Satellite/Sat*/Sensor/*
The command with this path will affect all Sensor objects on all Satellite objects with names beginning with "Sat".
*/Satellite/*/Sensor/*
The command with this path will affect all Sensor objects on all Satellite objects.
Chains */Constellation/ConstObj Add Place/*
The command adds all Place objects in the scenario to a Constellation object.
Chains */Constellation/ConstObj Add Place/*/Transmitter/*
The command adds all Transmitter objects on a Place object to a Constellation object.
The following table outlines some of the common graphics options used in Connect commands.
Option | Description | Examples |
---|---|---|
Color | You can enter colors in Connect commands in four different ways, described here:
|
Below are the four different ways to indicate the color red: red 6 %255000000 #ff0000 |
LineStyle | You can enter line styles in Connect commands as the line style name or the line style number:
|
LineStyle dotted LineStyle Solid LineStyle 7 |
FillStyle | You can enter fill styles in Connect commands as the fill style name or the fill style number:
|
FillStyle VerticalStripe FillStyle 3 FillStyle Solid |
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: 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}:
|
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 |
Where a Connect command requires a template specification, you can also use a Central Body component.
Template Example | Description |
---|---|
"Satellite EphemerisEpoch Time Instant" | The ephemeris epoch time instant template for a Satellite object |
"Sensor Boresight Vector" | The boresight vector template for a Sensor object |
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, NoonToday, NoonTomorrow, Now, UseAnalysisStartTime, UseAnalysisStopTime. Today and Tomorrow represent midnight (local time) of the current or next day. NoonToday and NoonTomorrow represent noon (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. You must enter the times in order, but they need not be in the same format. | See the table below for formats for "<StartTime>" "<StopTime>". |
The following formats are available for entering "<StartTime>", "<StopTime>", and "<TimeLimitInstant>".
"<StartTime>", "<StopTime>", or "<TimeLimitInstant>" | 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, NoonToday, NoonTomorrow, Now, UseAnalysisStartTime, and UseAnalysisStopTime. Today and Tomorrow represent midnight (local time) of the current or next day. NoonToday and NoonTomorrow represent noon (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. |
"NoonToday" "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, or 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.
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 subdirectory 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" |
The following table describes various notes you 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 enable you to include a variable number of options on the command line. If, however, you enter 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, Color will be set to yellow for the model, not red. |