Cancel
Showing results for 
Search instead for 
Did you mean: 

reset a simulation through method

Builder
Builder

Hello,

 

Is there some way to run loops through a method?

 

example:

for local ii:= 1 to 10

     variable x:=  x + 1

     eventcontroller.start
     waituntil eventController.isrunning = false

      eventcontroller.reset

next

 

When I run this method, when the command eventcontroller.reset executes the simulation kill the method

and the loop doesnt occurs.

 

How to solve that?

3 REPLIES 3

Re: reset a simulation through method

Siemens Phenom Siemens Phenom
Siemens Phenom

By utilizing the EndSim-method of the model you could build it, but why should you do things that are already provided by the ExperimentManager. The ExpMgr is able to modify any parameter within a sequence of to be performed experiments.

 


Regards

Always consider using the AttributeExplorer!
Highlighted

Re: reset a simulation through method

Builder
Builder

that´s because I want the result to be recorded in variables once I get a screenshot from the model to report results. If I run the experiment manager the result will appear only in it´s report.

 

I am going to try the EndSim method.

 

Thank you for the advice.

Re: reset a simulation through method

Siemens Phenom Siemens Phenom
Siemens Phenom

check the attached spp ... just one line of code


Regards

Always consider using the AttributeExplorer!