Jump to content
Developer Wiki and Function Reference Links ×

Script execution upon layer change


Juno

Recommended Posts

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 ]

Link to comment

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.

Link to comment

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...