Jump to content
DCarpenter

duplicate objects created

Recommended Posts

So I've created a simple script that duplicates a selected symbol from a pop-up window.  I've also added an event script that changes the "Distance" parameter based on the symbol selected.  Developer mode is 'off', but I don't understand why when the PIO is executed that it creates a second set of symbols outside of the PIO.  That second set of symbols are always in the exact same location in every drawing, regardless of where the PIO is.  I've attached a screen shot if it's helpful.  Any ideas why?

Screen Shot 2020-03-05 at 4.32.56 PM.png

Share this post


Link to post

The duplicates are likely being placed relative to the internal origin.. Try making sure the symbols are being inserted in Event = 3. Otherwise they can be outside the PIO container.

Share this post


Link to post
Posted (edited)

wow, that would make sense.  This is my first time creating an event enabled script.  Do I have to move entire script into Event 3?  Is this a general rule of thumb when working with event enabled scripts?

 

Edited by DCarpenter

Share this post


Link to post

Yes once a PIO is event enabled, then everything must be dealt with in the correct event. I'm pretty sure there are some sample event based PIOs floating around or in the SDK.

Share this post


Link to post

ok, thanks.  Yes, I found a really great script someone posted a few years ago that really help.

 

Thank you.

Share this post


Link to post

If they are also "outside" the container of your PIO, so not part of it, you need to attach them to the PIO's container after duplication.

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...