3
$\begingroup$

I'm working with Python and STK integration. I need to build scenarios and save them, the problem is that I cannot find any saving example on AGI's documentation. Here is a starting point:

import win32com.client

uiApplication = win32com.client.Dispatch('STK11.Application')
uiApplication.Visible = True

root = uiApplication.Personality2

root.NewScenario('this_Scenario')
satellite = root.CurrentScenario.Children.New(18, 'this_Satellite') # eSatellite

input("Press enter to exit script.")

How to tell STK to save the created scenario?

$\endgroup$
  • $\begingroup$ @DanPichelman : This is SpaceExploration.SE, I don't think there is a Space.SE. I did happen to post it before in Politics by accident. $\endgroup$ – Mefitico Feb 21 at 12:09
4
$\begingroup$

Your variable root is of type IAgStkObjectRoot. If you search the Programming Interface Help, there are five save related methods for this type. These include Save() and SaveAs()

So the easiest implementation would be: root.Save() which will save the scenario in the Documents\STK folder.

If you want to control the specific location to save to you can try: root.SaveAs([FULL FILE NAME AND PATH])

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.