Cancel
Showing results for 
Search instead for 
Did you mean: 

04=How do you code a method directly within an object entry/exit control?

Genius
Genius

Sorry - can't remember how we did this on the course, and cannot find it in the course notes or in this forum.

I am sure that simple methods were coded directly in the object's controls without using a separate method object. 

I'd like to use this to assign some tracing information for an object calling a logging method, either assigning a global string, or passing a string as a parameter to the logging method.

Any suggestions on the merits of doing one or the other of these :

Inline entry method ::    mySeq = "1a";  LogEntry;

or

Inline entry method ::    LogEntry( "1a")

 

 

 

Side issue - I have the signature line below stored as a Macro in my "community profile", how do I invoke this macro ?


____________________________________________
PlantSim Ver 14.1.0.1294   &  Windows 7 Ent. SP1

~~~~  1st post in thread  ~~~~

2 REPLIES

Re: How do you code a method directly within an object entry/exit control?

Siemens Phenom Siemens Phenom
Siemens Phenom

Open the object dialog of the object in question and go to the Controls page.

Open the context menu in the control you want to code and select Create Control or press F4.

After you have saved the changes, you can edit the nested method with Open Object or F2.

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

Re: How do you code a method directly within an object entry/exit control?

Genius
Genius
That's perfect, thanks a lot

Just some notes for myself

Right click in Entrance or Exit Control, F4 {Create Control}

The inline method is then referenced as
self.OnEntrance