GetState()

Gets the state of a specified data model container (can be either a singleton or an object).

Returns a dictionary with parameters (settings) as keys and the parameter values as values.

If given a container path that does not match a stored path, then returns an empty dictionary, regardless of path validity.

Note that this command can also be used with DatamodelRoot(). In this case, no argument is required.

Essential Keyword Arguments

ObjectPath : string

Path of the container for which a state is returned.

Return Type

Dictionary

Examples

Example 36: Use with ObjectPath to get the state of a singleton


GetState(ObjectPath = '/SystemCoupling/AnalysisControl')

{'AllowSimultaneousUpdate': False, 'AnalysisType': 'Transient', 'PartitioningAlgorithm': 
'SharedAllocateMachines', 'GlobalStabilization': {'Option': 'None'}}


Example 37: Use with DatamodelRoot() to get the state of a singleton


DatamodelRoot().SolutionControl.GetState()

{'DurationOption': 'EndTime', 'EndTime': '0.01 [s]', 'MaximumIterations': 20, 
'MinimumIterations': 1, 'TimeStepSize': '0.001 [s]'}