I am using the GMAT Python API to run scripts, fx the Ex_R2022a_TLE_Propagation.script can be used as an example, as this is included in GMAT/samples.
import gmatpy as gmat
# Run setup script
gmat.LoadScript('Ex_R2022a_TLE_Propagation.script')
gmat.RunScript()
In this script a report file is created with the propagation results (time, X, Y, Z, VX, VY, VZ).
I can access the last X element for example by
x = orp.gmat.GetRuntimeObject("ExampleSat.X")
x.GetTypeAndValue(8)
ans[0]: ' Real -244.1779559915077'
Is it possible to access the results (all X, Y, Z, ... values) written in the report file through the objects loaded in GMAT from the script? (I would like to avoid opening the report file.)
Bonus question: Is it possible to load a script by loading the content of the script-file itself and not the path to the file? I am pretty sure the answer is no, but I will give it a try.