have a look at the TxSimulationPlayer class provided by the SDK.
At any given moment there is a single, current simulation player, with which all simulation-related commands and viewers work. To get the current simulation player, use the TxApplication.ActiveDocument.SimulationPlayer property.
This class fires events for the Simulation for example "TimeIntervalReached" or "OperationEndedForward".
With the event arguments you get access to the operation (ITxOperation). This class has a Property called SimulatedObjects. You will find the assigned robot in this property. With the robot object you have access to the values you want to read.
TxApplication.ActiveDocument.SimulationPlayer.OperationEndedForward += OperationEndedForward;
public void OperationEndedForward(object sender, TxSimulationPlayer_OperationEndedForwardEventArgs args)
// assuming the first object in the list is the robot object
var robot = args.operation.SimulatedObjects as ITxRobot;
// access tcpf var tcpf = robot.TCPF;
Code is not tested but i think you get an idea how it should work.
ICARUS Consulting GmbH
Registergericht: Amtsgericht Lüneburg HRB 110610
Geschäftsführer: Markus Baschwitz, Andre Jürgens-Tatje, Maik Pretzel