I am tring to call Undo Command via TxCommandsManager by using method: ExecuteCommand(String).
But in every case I get Exeption, casue my commandID is wrong.
How can I get correct commandID for every command, for example how to get commandID for PlacementEditor?
Solved! Go to Solution.
From Tecnomatix.NET manual, there is a list of commands that can be used by CommandsManager:
In addition to these commands, you can implement this kind of automation for your own customized commands!
to do this you have examine the files RibbonConfiguration.xml in the eMPower folder, which contains the definition for a PS ribbon. Here you can find the GUID of the required command. After that you can examine the file NewAssembler.xml in the same folder and search for GUID.
The ID for Undo command is "Edit.Undo".
I have not found how to get the command parameters...
P.S. The ID for a placement manipulator is "Placement.PlacementManipulator"
I agree with you, it would be nice to have such feature, but at the same time commands can be updated and changed when a new version is released leading your call to that command to be affected.
The recommendation is to implement your own commands (if command exist, you can try to implement something close to what you have in the software).
By the way, there's a topic with this subject
If the command is changed, the documentation has been changed also. That’s like all documentation.
You suppose to implement own command is good, if it’s possible. In many cases API does not purpose the needed methods, e.g. to import BOP to EMServer, unite solids and so on.
You should use the Command manger to execute your command, or those that are in the list. For all other commands, we cannot guarantee that your code will work with later version of TX (i.e. we may change the command id, but not its interface).
Why do you need to execute the command via the command Id and not with a direct call to the method?
The reason is very simple: it is not any method in API to do that, what can be done with the command. In example it is not possible to import BOP xml over API or to start the placement manipulator for an object.
I would prefer to use the API methods. But it is a lot of things, that are not available over API.
P.S. In case of placement manipulator surely I can create the dialog, that allows edit position of the object, but I will lost the drag and drop functionality of the placement manipulator in process simulate.