Your Privacy
We use cookies to give you a better experience in LSAS TEC
You can learn more about what kind of cookies we use, why, and how from our Privacy Policy. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings in our cookie banner to change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. For more details, check out our Privacy Policy link below.
Strictly Necessary Cookies
These cookies are necessary for the website to function and cannot be switched off in our systems, but do not store any person information. They are usually set in response to your actions that triggers a request for services, such as setting your privacy preferences, logging in or filling forms. You can change your browser settings to alert you about these cookies, but some parts of the Website may not work.
View Cookies
How do I automate access reports
0 Votes
Ethan Poley posted 5 months ago Best Answer
Hey Matt,
To automate the creation of access reports in Python, we can Python's ability to run connect commands. To do this we have to have a running instance of STK with our scenario where we would like to compute access. Alternatively, you can include this command at the end of a scenario you have written in Python.
To connect your code editor to your current STK scenario, include the following code:
from agi.stk12.stkdesktop import STKDesktop
from agi.stk12.stkobjects import *
from agi.stk12.stkutil import *
stk = STKDesktop.AttachToApplication()
root = stk.Root
To generate and view an access report using Python, run the following:
root.ExecuteCommand("ReportCreate */Satellite/<name of satellite> Style \"Access\" AccessObject */Facility/<name of facility> Type Display")
You can replace the Satellite and Facility objects shown here with the objects you wish to compute access between.
Hope this helps!
0 Votes
1 Comments
Ethan Poley posted 5 months ago Answer
Hey Matt,
To automate the creation of access reports in Python, we can Python's ability to run connect commands. To do this we have to have a running instance of STK with our scenario where we would like to compute access. Alternatively, you can include this command at the end of a scenario you have written in Python.
To connect your code editor to your current STK scenario, include the following code:
from agi.stk12.stkdesktop import STKDesktop
from agi.stk12.stkobjects import *
from agi.stk12.stkutil import *
stk = STKDesktop.AttachToApplication()
root = stk.Root
To generate and view an access report using Python, run the following:
root.ExecuteCommand("ReportCreate */Satellite/<name of satellite> Style \"Access\" AccessObject */Facility/<name of facility> Type Display")
You can replace the Satellite and Facility objects shown here with the objects you wish to compute access between.
Hope this helps!
0 Votes
Login or Sign up to post a comment