Top  Previous  Next


The Restore command returns an object (and any attached objects) to a state saved previously within the Mission Sequence. The Save command must be used to store the state internally before the Restore command can be used.




// Save/Restore a single object

Save mySpacecraft;
Maneuver mySpacecraft using myFiniteBurn;
Report mySpacecraft.A;
Restore mySpacecraft;
Save mySpacecraft as "SCState";
// ...
Restore mySpacecraft from "SCState";
// Save/Restore multiple objects
Save mySpacecraft, myString as "initialState";
// ...
Restore mySpacecraft, myString from "initialState";




An unlimited number of objects can be restored using a single command.

The Object.Restore() method can be used as an alternative to the Restore command.


The Save and Restore commands provide the functionality of the Put and Get commands, without involving external files.

oThe Object.PutToFile(), Object.PutToString(), Object.GetFromFile(), and Object.GetFromString() methods can also be used in place of the Put and Get commands.


All the properties of the Saved object(s) are restored, including the properties of all subsystems such as Propagators, ForceModels, and hardware such as Sensors, Tanks, GroundAntennas, etc.


The Save and Restore commands can only be used to restore an object back to a previous state.

oThese commands can’t be used to save the state of one object and then populate another object with that state.  

oFor information about copying the state of one object into another object, see the Assignment and Put and Get commands.


The string used with the optional "as" and "from" clause is used to identify the saved states, allowing you to hold multiple saved states in memory.

oIf the "as" and "from" clauses are not used, the object will be restored using the data from the most recent Save command.

oYou can save the state of the same object at different points in the Mission Sequence and restore it to those times separately, so long as you use different strings (for example, "SCstate1" and "SCstate2").


Saved states persist in memory only during the current execution of the Mission Plan. Therefore, states from a previous run cannot be accessed during a new run.


The Save and Restore command can not be used with Lists or Formations.


Saved states can be cleared using the Object.ClearSavedStates() method.



Command Editor

Object to Restore

Object (whose state has been saved using the Save command) whose previous configuration you would like to restore


Restore location

A text string specifying the name of the saved state that was used with the Save command



Displays the FreeFlyer Script that is generated by the editor



Displays descriptions of the editor and its fields

Description text changes as the mouse pointer moves over the different fields within the editor




See Also

Save Command

Put Command

Get Command

Object.Restore() Method