Alexandre Villares Posted July 28, 2002 Share Posted July 28, 2002 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 Quote Link to comment
Fuge Posted July 29, 2002 Share Posted July 29, 2002 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. Quote Link to comment
Justin Smith Posted September 26, 2014 Share Posted September 26, 2014 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? Quote Link to comment
Pat Stanford Posted September 26, 2014 Share Posted September 26, 2014 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); Quote Link to comment
Justin Smith Posted September 26, 2014 Share Posted September 26, 2014 Hah! Why didn't someone mention CreateDuplicateObject! Thanks pat. Quote Link to comment
Pat Stanford Posted September 28, 2014 Share Posted September 28, 2014 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 Quote Link to comment
Pat Stanford Posted September 28, 2014 Share Posted September 28, 2014 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 Quote Link to comment
Pat Stanford Posted September 28, 2014 Share Posted September 28, 2014 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 Quote Link to comment
Vectorworks, Inc Employee klinzey Posted September 29, 2014 Vectorworks, Inc Employee Share Posted September 29, 2014 Unless something has change CreateDuplicateObject() will not work for SymDefs. Quote Link to comment
Justin Smith Posted December 26, 2014 Share Posted December 26, 2014 I updated my make unique code here. This only works for 3D symbols that are not inside of a group. https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py Quote Link to comment
MarcelP102 Posted June 20, 2021 Share Posted June 20, 2021 Found out of this script. To bad it won't work with Hybrids 2D/3D symbols. But now it's 7 years later. Any possibility that VW script capability has grown so a true "make unique" script is possible? @Pat Stanford @Justin Smith Quote Link to comment
Pat Stanford Posted June 20, 2021 Share Posted June 20, 2021 @MarcelP102 let's go back a step. Rather than our trying to guess what you want based on a 7 year old thread, why don't you start a new thread with a description of what you want to accomplish. Then perhaps we will be better able to make current recommendations. 1 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.