Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added StkAutomation/Html/StkKmlExporter/AGILogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1,647 changes: 1,647 additions & 0 deletions StkAutomation/Html/StkKmlExporter/StkKmlExporter.htm

Large diffs are not rendered by default.

Binary file added StkAutomation/Html/StkKmlExporter/gelogoicon.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added StkAutomation/Html/StkKmlExporter/leaf.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added StkAutomation/Html/StkKmlExporter/legend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added StkAutomation/Html/StkKmlExporter/minus.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added StkAutomation/Html/StkKmlExporter/plus.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions StkAutomation/Python/StkMetaDataExtractor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# STK Metadata Extractor

This script will read an STK scenario with an instance of STK Engine to extract metadata from that scenario.

As a Code Example, this script should demonstrate how users can iterate through all objects in a scenario and interrogate each object type for information related to that specific type.

This is a work in progress but the goal will be to create a summary file (formatted in XML, JSON or other) to briefly describe the scenario contents.

# Usage

This script is intended to be used from the command line with two arguments:
1. the path to a scenario file (*.sc or *.vdf).
2. the desired path of the output file (*.xml or *.json)

Example:
python StkMetadataExtractor.py "c:\Temp\sampleScenario.vdf" "c:\Temp\summary.xml"

The output summary.xml file will briefly describe the contents of the scenario.




## License

The Code Examples in this repository are licensed under the AGI Code Examples License Agreement, which is included in this repository as [License.pdf](License.pdf).

## Redistribution
If You redistribute the Code Examples, in whole or in part, You must provide a copy of this License Agreement to any other recipient of the Code Examples, and include the following copyright notice:

© 2020 Analytical Graphics, Inc.

## What if I have questions about STK

Contact [email protected] with any questions regarding STK, STK Engine or any other AGI products.

AGI's ready-to-use STK and ODTK families of products, enterprise software, and developer tools help customers deliver digital engineering value and make better-informed decisions in a mission context at any stage in the program lifecycle: from planning and design to training and operations.

For more information, please visit the [AGI website](https://www.agi.com "AGI's Homepage").
52 changes: 52 additions & 0 deletions StkAutomation/Python/StkMetaDataExtractor/stkMetaDataExtractor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Get reference to running STK instance using win32com
from win32com.client import GetActiveObject
uiApplication = GetActiveObject('STK12.Application')


# Get our IAgStkObjectRoot interface
root = uiApplication.Personality2

print(root.CurrentScenario.InstanceName)
print("Total number of objects: {0}".format(len(root.CurrentScenario.Children)))

for stkObject in root.CurrentScenario.Children:
print(stkObject.ClassName + " " + stkObject.InstanceName)

if stkObject.ClassName == "Facility":
positionArray = stkObject.Position.QueryPlanetocentric()
print('Position: {0:3.2f} {1:3.2f}'.format(positionArray[0], positionArray[1]))

#if stkObject.ClassName == "AdvCAT":
#if stkObject.ClassName == "Aircraft":
#if stkObject.ClassName == "Area Target":
#if stkObject.ClassName == "Attitude Coverage":
#if stkObject.ClassName == "Chain":
#if stkObject.ClassName == "CommSystem":
#if stkObject.ClassName == "Constellation":
#if stkObject.ClassName == "Coverage Definition":
#if stkObject.ClassName == "Facility":
#if stkObject.ClassName == "Ground Vehicle":
#if stkObject.ClassName == "Launch Vehicle":
#if stkObject.ClassName == "Line Target":
#if stkObject.ClassName == "MTO (Multi-Track Object)":
#if stkObject.ClassName == "Missile":
#if stkObject.ClassName == "Missile System":
#if stkObject.ClassName == "Planet":
#if stkObject.ClassName == "Radar":
#if stkObject.ClassName == "Receiver":
#if stkObject.ClassName == "Satellite":
#if stkObject.ClassName == "Scenario":
#if stkObject.ClassName == "Sensor":
#if stkObject.ClassName == "Ship":
#if stkObject.ClassName == "Star":
#if stkObject.ClassName == "Target":
#if stkObject.ClassName == "Transmitter":
#if stkObject.ClassName == "Figure of Merit":
#if stkObject.ClassName == "Root":
#if stkObject.ClassName == "Access":
#if stkObject.ClassName == "Coverage":
#if stkObject.ClassName == "Attitude Figure of Merit":
#if stkObject.ClassName == "Submarine":
#if stkObject.ClassName == "Antenna":
#if stkObject.ClassName == "Place":
#if stkObject.ClassName == "Volumetric":
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IRouteService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536000" maxBufferPoolSize="524288" maxReceivedMessageSize="65536000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_IGeocodeService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536000" maxBufferPoolSize="524288" maxReceivedMessageSize="65536000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<customBinding>
<binding name="CustomBinding_IRouteService">
<binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
maxSessionSize="2048">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536000" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536000" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
<binding name="CustomBinding_IGeocodeService">
<binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
maxSessionSize="2048">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536000" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536000" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://dev.virtualearth.net/webservices/v1/geocodeservice/GeocodeService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeocodeService"
contract="BingGeocodeService.IGeocodeService" name="BasicHttpBinding_IGeocodeService" />
<endpoint address="http://dev.virtualearth.net/webservices/v1/geocodeservice/GeocodeService.svc/binaryHttp"
binding="customBinding" bindingConfiguration="CustomBinding_IGeocodeService"
contract="BingGeocodeService.IGeocodeService" name="CustomBinding_IGeocodeService" />
<endpoint address="http://dev.virtualearth.net/webservices/v1/routeservice/routeservice.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRouteService"
contract="BingRouteService.IRouteService" name="BasicHttpBinding_IRouteService" />
<endpoint address="http://dev.virtualearth.net/webservices/v1/routeservice/routeservice.svc/binaryHttp"
binding="customBinding" bindingConfiguration="CustomBinding_IRouteService"
contract="BingRouteService.IRouteService" name="CustomBinding_IRouteService" />
</client>
</system.serviceModel>
</configuration>
Loading