Cancel
Showing results for 
Search instead for 
Did you mean: 

Is there some code to check if a method is executing (or not)?

Builder
Builder

Is there some code to check if a method is executing (or not)?

7 REPLIES 7

Re: Is there some code to check if a method is executing (or not)?

Siemens Phenom Siemens Phenom
Siemens Phenom

Nope.

Why would you need that?

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Is there some code to check if a method is executing (or not)?

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Yes you can use the Print Command to write text or parameters to the Output Console

You can also use breakpoints in the code to stop when that line is reached.

Re: Is there some code to check if a method is executing (or not)?

Builder
Builder

I need that because I have several init methods in the model and I want they wait one of the init methods to be executed first so when it´s concluded all the others init can run  Smiley Happy

Re: Is there some code to check if a method is executing (or not)?

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

In that case I would suggest writing prints into each of your statements that tell you exactly what is being excuted in what order.

For Example

Print "Init Method 1 Started"

Print "Init Method 1 Completed"

However if you want then to run after a certain action is called would it not be better to call them as methods from the first init method or put the first code into the reset method?

Re: Is there some code to check if a method is executing (or not)?

Phenom
Phenom

you can set a self defined attribute (=true) at the beginning of method execution

 

and reset it (=false)  at the end ( return).

 

or

 

to keep the overview

 

write/cut the method path in a table

 

or

 

you can observe the attribute.

 

Re: Is there some code to check if a method is executing (or not)?

Phenom
Phenom

Addendum

 

@Ricardo_S

 

reading  "wait one of the init methods to be executed first so when it´s concluded all the others init can run.."

 

There is a determined Call Sequence which can be changed (s. screen shot below)

 

Maybe it wouldn't be a bad idea, to create your own call sequence by using 1 init ( or reset -if possible) method

 

in the root frame, which calls the renamed init methods in the sub frames.

 

Unbenannt.PNG

Re: Is there some code to check if a method is executing (or not)?

Builder
Builder

Good tips. Thank you all for the advises.