Jump to content
Developer Wiki and Function Reference Links ×

Layers for PIOs?


IKeo

Recommended Posts

I am trying to write PIO scripts which put everything that is created in the script onto a certain layer, and then revert back to the orginal layer. The "Layer" command just makes a new layer but doesn't create the objects following it on that layer. I thought that was what this command was for. Any suggestions would be greatly appreciated.

Link to comment

That does not really fit in with the purpose of plug-in objects. Perhaps you would be better off developing a plug-in tool.

Plug-in object scripts are just supposed to create the sub-objects that define the object. They are not supposed to create objects on other layers.

Here is a little behind the scenes info: When an object is reset, VectorWorks will actually set the current layer to be the plug-in object node itself and then it calls the script. Now in the script, when objects are created they are automatically in the plug-in object's sublist.

Link to comment

Very interesting and informative! Here's my problem. I am building several drawing tools (labels, section markers and the like) which I want to have the behavior of PIOs (i.e. linear labels, rectangular detail markers). If I build them as tools, then they are just a group of objects or, at best, a symbol, which to my understanding then can't be edited like a PIO (i.e. editable text fields and such). Therefore it seems that I am searching for a way to get the layer information from inside the PIO, much like you can get the rotation info. Perhaps there is no way to do this, but it sure would be nice. Perhaps an addition in VW10 to the PIO "Object Properties" dialog, that asks for the "Default Layer" as well. Thanks again.

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...