I have a Method associated with managing the WIP storage of a process WS4, "WS4_Meth_Storage".
How do I access its Label, XPos and YPos attributes from within another method?
"//WS4_Meth_Storage : " + to_str( WS4_Meth_Storage.Label)
fails as the debugger reports
Cannot evaluate expression for the term WS4_Meth_Storage.Label
I can access and change the Label, and both *Pos attributes, from the attribute and methods explorer in the method's right click menu.
Also I can access and also change these three attrributes for any frame and processing objects using SimTalk within a method.
I need the Method to move with its Processing Object, under control of a method that re-arranges model elements at different locations on the model mimic, and it would be a huge pity if this fails because the Method cannot support this functionality.
I suppose a workaround could be to locate it in a frame, but that seems a huge pity given it should behave like the other model objects.
Thanks for any feedback.
PlantSim Ver 184.108.40.2064 & Windows 7 Ent. SP1
~~~~ 1st post in thread ~~~~
Solved! Go to Solution.
Thanks a lot simulator, that is exactly what I needed. Would have been hard to find myself in the help file.
So to summarise nicely, here is the actual implementation where the specific method's x position is read and logged, and thereafter a new position read from a table file and it is updated.
// Log original position
"&WS4_Meth_Storage.XPos := " + to_str( &WS4_Meth_Storage.XPos) )
// Update position for revised layout
&WS4_Meth_Storage.XPos := str_to_num( BFX_Locns[2, iRow+iRow_IN])
It makes sense reading about use of & in the online help file, without this address-of operator, the method would be called.