Jump to content

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.

Link to comment

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.

Link to comment
  • 4 weeks later...

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...