Jump to content
Sign in to follow this  
IanH

Copy objects between layers

Recommended Posts

Attached is a simple script that copies objects from one layer to the current layer/class.

This is useful if you have a prototype/concept on one layer and want to copy elements of it to a new layer and class. I normally start off with a concept layer and use basic classes such as mass, void, water, movement, planting. When I am happy with proportions and layout, I then move some of these elements to become physical elements within the garden. Normally this would be done with a cut and paste in place.

This tool allows this function to be assigned to a right mouse click or menu command. Should work with VW12.5 and later. Developed under Windows.

Copy to your user plugins folder and change your workspace to add the copy 2 layer command under the menu miscellaneous section to a drop down or right click menu.

Whilst every care has been taken to test this tool, it is provided here in good faith and no liability can be taken from errors or loss of work resulting in its use or installation. As with IT in general, especially where work is of commercial value, it is prudent to take pertinent backups/copies of your work before installing and running this script.

Share this post


Link to post

Having used this script for the last few days, today I found that when editing a symbol, on exiting the symbol edit, Vectorworks crashed.

I have temporarily tracked it down that this happens after this script has been run. I can't actually find anything wrong with the script, and it works fine on another document, but for the time being, I would play safe and not use this script.

I suspect that my document is showing early signs of corruption.

Unfortunately I am unable to edit the original post to remove the script.

I can't reiterate how important it is to take regular snapshots of your work and also to enable the Vectorworks auto backup feature and use it to make regular timed backups whilst keeping previous versions. This is done in the autosave tab under Vectorworks preferences in the tools / options menu.

Share this post


Link to post

I have submitted a bug report (for Vectorworks not my script ;) ) - at the very least, NNA should look at making symbol edit more robust and even better find what is corrupting the file.

Share this post


Link to post

A way to copy objects on a layer to a new layer can be done without this script. Simply go to the layers dialog, highlight the target layer and push the duplicate button. And while the Duplicate Layers button works on duplicating objects, the Duplicate Classes button does not. Does your script add any functionality to classes? Just curious.

Share this post


Link to post

Ian ... we all appreciate your efforts with scripting and have encountered similar subversion issues , too ; )

That's why... when it comes to downloadable scripts ( not just the text ) it's recommended to post the URL to an ftp server where versions can be easily uploaded, as required.

Share this post


Link to post

Bob

The duplicate layer command works with all objects on the layer. This script will only copy selected objects.

So you may have a source layer containing many objects, but only want to copy a handful to a new layer/class. You simply select the objects on the source layer that you want to copy and the script will copy to the current layer and class.

islandmon

Must get my ftp server back up and running. I have come to the conclusion that there is nothing inherently wrong with the script, but the file that I was working on had become corrupted in some other way.

Share this post


Link to post

Thanks for the clarification, IanH, and for the script. I'll try it out, now that the warning was false. I never had any crash problems with VectorScript -- they usually time out if the script hits an open loop. VectorScript reminds me very much of HyperCard script, which I enjoyed tinkering with back in the Mac System 6 thru 7 days.

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.

×