cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to use commands already given by Process Simulate?

Siemens Pioneer Siemens Pioneer
Siemens Pioneer

Question:

 

Is there a way to use commands already given by Process Simulate? Execute them using a "name of the command" as a parameter? I've seen this somewhere in the API docs but i can't find them anymore.

 

Answer:

 Commands can be executed with CommandsManager:

 

TxApplication.CommandsManager.ExecuteCommand("EMServer.Properties");

TxApplication.CommandsManager.ExecuteCommand("ObjectViewing.Blank",
       new TxMultipleObjectParameters(TxApplication.ActiveSelection.GetItems()));

 

We recommend to use this utility for custom commands(commands that you have created) as some changes may be introduced to PS commands in future versions.

More over most of the functionality is covered by the .NET API and users may implement their own logic.

Here is the list of commands, that we provide in the API manual that can be used with CommandsManager:

 

EMServer.Properties

TxPropertiesViewerParameters

Shows the Properties of an object.                                                                        

EMServer.Load

TxEmsOpenStudyParameters

Loads an object to the graphic viewer.

ObjectViewing.Blank

TxMultipleObjectParameters

Blanks objects.

ObjectViewing.Display

TxMultipleObjectParameters

Displays objects.

ObjectViewing.DisplayAll

None                                         

Displays all objects.

SnapshotEditor.AddSnapshot

TxSingleObjectParameters

Creates a snapshot.

The snapshot is returned as a parameter.                                                                 

SnapshotEditor.RemoveSnapshot

 TxSingleObjectParameters

Deletes a snapshot.

SnapshotEditor.UpdateSnapshot

TxSingleObjectParameters

Updates a snapshot.

SnapshotEditor.ApplySnapshot

 TxSingleObjectParameters

Loads a snapshot.