PC SDK: Get currently used workobject while simulation
I am new to programming in Add-Ins for ABB Robotstudio and have one question. I am trying to get the current tool position while simulating.
My target is that I want to get the to position of the TCP regarding the currently used workobject which is probably moved by an external axis. What I need is the currently used workobject, the position of the workobject and the current TCP of the robot while the simulation runs.
What I already got is the current position of the TCP (tooldata) with the RsTask.ActiveTool.Frame.GlobalMatrix instruction. But this only works, if I choose the right tool in the Home->Settings Tab. In some of my routines the workobject and the tool changes. What I really need is the current position of the active used tool and workobject in the robot.
Thanks in advance