Juno Posted May 13, 2002 Share Posted May 13, 2002 Is it possible to execute the script for a plug-in object, whenever it is sent to a different layer from the Obj Info Palette? I would like to automatically re-scale the object on the new layer. Quote Link to comment
Fuge Posted May 14, 2002 Share Posted May 14, 2002 You can't execute a script by changing an objects layer from the Object Info palette. You could write a menu script however to ask what layer to move the object to and have it scale it. That's do-able. Fuge [ 05-13-2002: Message edited by: Fuge ] Quote Link to comment
Alexandre Villares Posted May 14, 2002 Share Posted May 14, 2002 Put in your Plug-In Objects some code to re-scale acording to the layer scale (they'll become scale independent PIug-In Objects) , then you can just 'wake them up' (force a redraw / reset) like this: {--------------}Procedure WakeUpPIOs; Procedure WakeItUp( H : Handle); BEGIN SetClass(H,getclass(H)); END; BEGIN ForEachObject(WakeItUp,((T=PlugInObject))); END; Run(WakeUpPIOs);{--------------}PS: Be sure that your PIOs will make active their own layer as they draw themselves so that any text object will get the right size when they are reset. Quote Link to comment
Juno Posted May 15, 2002 Author Share Posted May 15, 2002 Thanks to you both. I was hoping to avoid a menu command to "refresh" or move the objects but your examples suggest some possible approaches that I can put to our group to see which they prefer. I appreciate the help. 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.