cancel
Showing results for 
Search instead for 
Did you mean: 

SimulationPlayer.SetOperation does not work

Experimenter
Experimenter

Hello,

 

i want to set a CompoundOperation to the Sequence Editor.

With a mouseclick on "Set Current Operation" it works just fine.

 

But after this line nothing happens. 

TxApplication.ActiveDocument.SimulationPlayer.SetOperation(compound as ITxOperation);

 

I get the Compound by: 

TxApplication.ActiveDocument.OperationRoot.GetAllDescendants

and filtering the Compound that i want. 

 

Best Regards

Henrik Wilshusen

ICARUS Consulting GmbH

Engineering Digital Factory

 

3 REPLIES

Re: SimulationPlayer.SetOperation does not work

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

Can you try if this works for you?

 

TxApplication.ActiveDocument.CurrentOperation = YouFfilteredOperation

 

 

Best regards

Patrick

Re: SimulationPlayer.SetOperation does not work

Experimenter
Experimenter
Hi,
yes it worked just fine Thank you.

Re: SimulationPlayer.SetOperation does not work

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

If you want to use the default simulation player that is accessible from TxApplication.ActiveDocument.SimulationPlayer, then you need to set the simulated operation as current operation of the document: 

TxApplication.ActiveDocument.CurrentOperation = operation;

 The default simulation player is associated with the Sequence Editor Viewer.

 

As a second option, you can create your own simulation player and then you need to set the simulated operation using the SetOperation. 

TxSimulationPlayer myPlayer = new TxSimulationPlayer();
 myPlayer.SetOperation(operation);
 myPlayer.PlayWithoutRefresh();

Best Regards,

DianaG