Jörgen Dohmen Posted May 18, 2020 Share Posted May 18, 2020 Dear fellow VWX users, Probably easy for the most of you but can someone help me with a script for duplicating a symbol with a fixed distance. For example a piece of scaffolding is 207,2cm and I want to duplicate. So if I assign a shortcut to the script I can doe it quickly without to go to array or something. Thanks in advance! Quote Link to comment
JBenghiat Posted May 18, 2020 Share Posted May 18, 2020 https://developer.vectorworks.net/index.php/VS:Duplicate For selected objects https://developer.vectorworks.net/index.php/VS:HDuplicate For identifying the object by its handle Quote Link to comment
Pat Stanford Posted May 18, 2020 Share Posted May 18, 2020 How would you like the script to work? Quote Link to comment
Jörgen Dohmen Posted May 19, 2020 Author Share Posted May 19, 2020 @Pat Stanford I would like to make a "command" if I have selected a symbol I can duplicate it with a fixed distance om X Y Z. This would be nice to draw big scaffolding objects. It are quite a lot components so it would speedup the workflow because most distances are 207,2cm or 103,6. Quote Link to comment
MRoth Posted May 19, 2020 Share Posted May 19, 2020 How do you want to enter the values? In a separate dialog box. In this case I would recommend you to use CTRL + D [Duplicate] and then CTRL + (ALT) + M [Move/Move 3D. If there schould be a command for each direction and length of movement, there will be six commands. But they are quite easy to create. Quote Link to comment
Jörgen Dohmen Posted May 19, 2020 Author Share Posted May 19, 2020 @MRoth Thank you! But still too much actions. I want to make them as a shortcut with the numeric keypad. For example CMD + shift + 6 for moving 207,2 on the x-axis or CMD + shift + 4 for moving -207,2 on the x-axis. Something comparative to this. The buttons would be great also but I think that isn't possible within Vectorworks. Quote Link to comment
MRoth Posted May 19, 2020 Share Posted May 19, 2020 I wrote you four scripts that duplicate an object and move it by the desired distance. Excuse me for bad scripting style. But it should work. Move Right.vsm Move Left.vsm Move Down.vsm Move Down.vsm Move Up.vsm 1 Quote Link to comment
Jörgen Dohmen Posted May 19, 2020 Author Share Posted May 19, 2020 @MRoth Thank you very much! This is exactly what I was looking for. You're scripting style is much better than my beginner's style 😉 Quote Link to comment
MRoth Posted May 19, 2020 Share Posted May 19, 2020 I forgot to tell you. To change the distances you can simply change the mass at d = (2072, 0, 0) #(x, y, z) Dimensions are in mm. 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.