Yancka Posted June 29, 2010 Share Posted June 29, 2010 Is there a way to establish a link in PIO to Sheet Layer specified by mouse click, retrieve the name of SL, display the part of the name in PIO as a text and later, in case the SL gets renamed, to have the text in PIO updated too? Quote Link to comment
Guest Frank Brault Posted June 30, 2010 Share Posted June 30, 2010 (edited) The pio would have to be reset somehow, either manually or by some other explicit method, because the pio normally does not get an event when a sheet layer is re-named. Edited June 30, 2010 by Frank Brault Quote Link to comment
Yancka Posted July 1, 2010 Author Share Posted July 1, 2010 Idea for resetting would be a menu command like: PROCEDURE ResetPIOs; VAR Criteria :STRING; PROCEDURE ResetMyPIOs(h :HANDLE); BEGIN ResetObject(h); END; BEGIN Criteria:=ConCat('(INSYMBOL & INOBJECT & (PON=',Chr(39),'Name Of My Custom PIO',Chr(39),'))'); ForEachObject(ResetMyPIOs, Criteria); END; RUN(ResetPIOs); What's the way you can make a link from PIO to any object? My case - to Sheet Layer, other case might be to SL Viewport? Quote Link to comment
Miguel Barrera Posted July 1, 2010 Share Posted July 1, 2010 By mouse click: FUNCTION PickObject(pX,pY:REAL): HANDLE; PROCEDURE ForEachObjectAtPoint(actionFunc:PROCEDURE; objOptions:INTEGER; travOptions:INTEGER; locX,locY:REAL; pickRadius:REAL); By name: FUNCTION GetObject(name:STRING): HANDLE; Quote Link to comment
Yancka Posted July 1, 2010 Author Share Posted July 1, 2010 ...the pio normally does not get an event when a sheet layer is re-named. Umm, and is there some "non-normal" way to deal with PIOs and make them event sensitive? Quote Link to comment
Miguel Barrera Posted July 1, 2010 Share Posted July 1, 2010 A PIO cannot get events from other objects. Only certain events within the PIO can be called. Rather than renaming directly, you can write a script that will rename the SL and also update the affected PIOs Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.