To automate repetitive tasks in STK, you can use HTML, Connect, and STK Objects to build tools that are accessible from within STK. Otherwise, drive STK remotely using tools, like the Button Tool or the COM Interface, or use a command line or batch file to send Connect commands to STK.
Sample project files are in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 formats. All files names contain "_VS2013", "_VS2012", or "_VS2010", indicating the format type.
All code samples for automating STK are organized by programming language and project name in the Automation area as outlined below.
<STK install folder>/CodeSamples/Automation/<Language>/<Project>
Note: The code samples included in the STK install are read only. If you wish to work with one of the samples, you should copy the appropriate directory to an area on the local machine where you have write permissions, and then mark the files writable before trying to compile them.
Language | Project | Description |
---|---|---|
C# | AccessConstraints | Shows how to bring up the STK UI and modify the access constraints on a satellite. |
AreaTarget | Configures an AreaTarget's characteristics via the Object Model in a running STK instance. | |
Events | Shows how to use the events generated in the STK UI. | |
Scenario | Show how to use and modify the scenario properties in the UI. | |
STK Tutorial | Shows how to set up a typical STK scenario using the Object Model and the STK UI. | |
UnitPreferences | Displays the Unit Preferences characteristics in a running STK instance. | |
ConnectToSpecificSTKInstance | Shows how to connect to a specific instance of STK. | |
Language | Project | Description |
Java |
Note: For instructions on configuring the Java samples with the Eclipse IDE, click here. |
|
Automation_Swing_STK | Based project used by all other Automation_Swing_STK_* samples for configuration necessary for AWT/Swing based applications. This project does not provide any runnabled sample. | |
Automation_Swing_STK_Basic | Creates a Java application process that uses the AGI Java API to connect to and programmatically drive/automate an external STK Application process. The connection mechanism uses process to process shared memory communication, not TCP/IP. | |
Automation_Swing_STK_CustomApp_Integration | Creates a Java application process that uses the AGI Java API to connect to and programmatically drive/automate an external STK Application process as well as then import a facility object to the embeded (in-process) STK Engine Runtime. The connection mechanism to the STK UI process uses process to process shared memory communication, not TCP/IP. The connection mechanism to the embedded STK Engine Runtime used direct Java to Native method calls in process. | |
Automation_Swing_STK_Plugin_AccessConstraint_Config | Configures and uses the "Extend_STK_Plugin_AccessConstraint_Config" Java plugin sample via STK Automation connection. | |
Automation_Swing_STK_Plugin_AccessConstraint_NIIRS | Configures and uses the "Extend_STK_Plugin_AccessConstraint_NIIRS" Java plugin sample via STK Automation connection. | |
Automation_Swing_STK_Plugin_AccessConstraint_Range | Configures and uses the "Extend_STK_Plugin_AccessConstraint_Range" Java plugin sample via STK Automation connection. | |
Automation_Swing_STK_Root_Events | Creates a Java application process that uses the AGI Java API to connect to and programmatically drive/automate an external STK Application process as well as show that event notification can be configured (i.e. turned on or off) to improve performance of the STK UI the application is connected to by not marshalling event information (like animation events) from process to process. | |
Automation_SWT_STK | Based project used by all other Automation_SWT_STK_* samples for configuration for SWT based applications. This project does not provide any runnabled sample. | |
MATLAB | ||
AnalysisWorkbench_ObjectModel | Creates a variety of vector, time, and calculation components through Object Model. | |
Astrogator_ObjectModel | This script walks through the basic functions of the Astrogator object model by building the "Hohmann Transfer Using a Targeter" tutorial, found in the STK help. | |
Comm_ConnectCommands | Creates a scenario to demonstrate communications and uses Connect commands to build up a transmitter and receiver by changing their definition properties. | |
Coverage_ObjectModel | This is an example of how to use MATLAB to create a scenario, add a satellite, add constraints, and compute revisit time for that satellite with Coverage. Additionally, this uses the Grid Inspector tool. | |
LifetimeTool | This example builds a satellite and then configures the Lifetime Tool through Connect commands and returns the date of decay, number of orbits, and days until deorbit. | |
STK_Automation_Tutorial | This is a complete example of the "Using MATLAB for STK Automation" tutorial that additionally points the sensor to the closest target in the collection and generates a graph in MATLAB of the results. |
STK Programming Interface 11.0.1