MarcelP102 Posted July 1, 2022 Share Posted July 1, 2022 (edited) Right now when cut/copy-paste an object from a symbol to outside the symbol using 'Edit > Paste in Place' it places the object on the coordinates from the symbol. Instead of exact the same place but then outside the symbol. I'm looking for a way to easily add or remove objects form a 2d/3d symbol without the position of that objects changes. Like when you cut/copy-paste an object outside a group. Is this something that a script can do? Can this be a command? (imho the easiest way) Or will this be a tool? (to click which objects to add/remove?) This is something I really miss compared to SketchUp. I think this will improve anyones workflow a lot. Any help making this function a reality is really appreciated. Some screenshot for explanation 1. Cut object 2. Paste in Place object places at coordinates as it was in the symbol. I would want it to be placed at same position but then outside the symbol Edited July 1, 2022 by MarcelP102 Quote Link to comment
PatW Posted July 1, 2022 Share Posted July 1, 2022 Do you usualy copy the whole content out of the symbol, then maybe "Modify->Convert to Group" is what you need. Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted July 1, 2022 Vectorworks, Inc Employee Share Posted July 1, 2022 The attached file contains two scripts that will do this – one for Cut and one for Copy. The scripts could easily be converted to menu commands and will only work if the symbol is selected then edited from the active layer by double clicking or via a keyboard shortcut. They won't work for a symbol edited from say the Resource Manager and might not work if you are within a group within a symbol. I wrote these just now while watching the footy so testing has been very limited. Use discretion until you have confidence they work as expected. Copy From Symbol Paste in Place.vwx 1 Quote Link to comment
MarcelP102 Posted July 1, 2022 Author Share Posted July 1, 2022 (edited) Thank you very much @Julian_Carr ! I will put it to the test. Enjoy the footy 😉 EDIT: Is it also possible to add (copy/cut) objects to the symbol that are outside of the symbol? Edited July 1, 2022 by MarcelP102 Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted July 2, 2022 Vectorworks, Inc Employee Share Posted July 2, 2022 That is slightly more challenging due to what might be in the clipboard, whether the current view is Top/Plan or not, and whether the symbol is hybrid. I added a script that will work in Top/Plan with 2D objects on the clipboard, but not so well in other views. Copy To From Symbol.vwx 1 Quote Link to comment
MarcelP102 Posted October 5, 2022 Author Share Posted October 5, 2022 Hi @Julian_Carr thanks again for the script. I.ve used it almost daily now. There is only one small bug that happens in all three the scripts. When you are in rotated plan view and the rotation of the symbol is 0 the scripts places or cut/copy the object at the wrong place. Do you have any idea why this happens? Copy To From Symbol - rotation bug.vwx Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted October 5, 2022 Vectorworks, Inc Employee Share Posted October 5, 2022 Rotated Plan View (RPV) is tricky to deal with - at least it was the last time I tried. GetPref(92) will tell you if the plan is rotated and GetPrefReal(93) will give you the angle, however both of these are read only. If they weren't, you would load the angle into a variable, set it to zero, do your copying and pasting, then restore the RPV. Something like this might work: bRPV := GetPref(92); IF bRPV THEN BEGIN VSave('_Random_'); SetView(0, 0, 0, 0, 0, 0); END; { your code } IF bRPV THEN BEGIN VRestore('_Random_'); VDelete('_Random_'); END; however using SetView() to establish Top/Plan may be fraught. Perhaps someone else will have a better idea for that. Quote Link to comment
MullinRJ Posted October 5, 2022 Share Posted October 5, 2022 (edited) To test for Top/Plan before you use SetView(), check that Projection = 6. IsView2D := GetProjection(ActLayer) = 6; { TRUE if view is TopPlan } To reset TopPlan after messing with SetView(), use: if IsView2D then begin SetView (0,0,0, 0,0,0); { Top view } Projection(6, 0, 10, -2, -2, 2, 2); { TopPlan } end; Raymond Edited October 5, 2022 by MullinRJ logic error 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.