Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Alexandre Villares

Duplicate Symbol Definition

Recommended Posts

I would like to make a copy of a Symbol Definition, in order to modify it later creating a variation of the original one...

I can create a new symbol and inside it convert to group and ungroup an instance of the original one.

This sort of works, but it's not very elegant and, unless I add some code, it won't do for 2D/3D Symbols:

CopySymbol won't help because it must bring the SD from another document. Any better ideas?

rgds,A

Share this post


Link to post

Not sure exactly how your doing your routine,but what I would try is this: Not pretty and may vary slightly, and not tested, but I don't think there's many choices here. - Good Luck!

1. Make sure your in Top/Plan2. Insert the symbol you want to copy into your page.3. Enter Edit Symbol4. Copy the 2d part of the symbol5. Exit Symbol6. Delete the symbol off the page7. Paste in place onto the page8. Create a new Symbol9. Delete your new symbol off the page10. Insert the original symbol back on the page.11. Enter Top view12. Enter Edit Symbol13. Copy the 3d part of the symbol14. Exit Symbol15. Delete the symbol off the page16. Insert the new symbol back into my page.17. Enter Edit Symbol for my new symbol again18. Paste in place the copied 3d part from the original symbol19. Exit the symbol.

Share this post


Link to post

In sketchup there is a "Make Unique" command in the context menu when you select a symbol, it works great for just what you are talking about.

I'm working on making a similar menu command for Vectorworks. It's in python. I've added as a gist here if anyone's interested.

https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py

BTW, why don't plugin's work as contextual menus?

Share this post


Link to post

Don't overcomplicate things.

The following is adapted from my history of the Vectorscript mail list and the notes on CreateDuplicateObject from developer.vectorworks.net. Make sure you read Charles' note at the bottom of the entry.

Thanks to Charles Chandler, Julian Carr and Gerard Jonkers.

Procedure Test;

var	H1,H2: Handle;

Begin
H1:=FSymDef;
H2:=CreateDuplicateObject(H1,GetParent(H1));
If H2 <> Nil then SetName(H2,'Duplicate Symbol');
Message(Date(2,2),GetSDName(H2));
End;

Run(Test);

Share this post


Link to post

I did, it just took me an extra two months to notice the thread ;-)

Actually, when I as answering, I did not notice that the original question was from July. Sorry about the delay.

Pat

Share this post


Link to post

I did, it just took me an extra two months to notice the thread ;-)

Actually, when I as answering, I did not notice that the original question was from July. Sorry about the delay.

Pat

Share this post


Link to post

I did, it just took me an extra two months to notice the thread ;-)

Actually, when I as answering, I did not notice that the original question was from July. Sorry about the delay.

Pat

Share this post


Link to post

Unless something has change CreateDuplicateObject() will not work for SymDefs.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

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.

×