four_by_ken Posted November 9, 2007 Share Posted November 9, 2007 I need to take everything that is on a layer and copy it to a new layer. Basically make an identical layer copy. This will be done on more than 70 drawing packages... totally more than 6000 files total. The original layer will remain unchanged... the new layer will then be updated, without anything being done to the old layer. That way a toggle between layers will show original vrs. new. Thanks Ken Quote Link to comment Share on other sites More sharing options...
four_by_ken Posted November 9, 2007 Author Share Posted November 9, 2007 Just to add, I am using 2002, no extra tools or anything are available. Quote Link to comment Share on other sites More sharing options...
halfcracked Posted November 9, 2007 Share Posted November 9, 2007 If you want to go for a shotgun method for the entire drawing, save the drawing under a different name then xref the old drawing into the new. I'd stop there.. but you could always bind & let acad tag the dwg name inront of the layers - boom new layer coppies of everything in the drawing. Personally I'd set the original file in an Archive directory then just xref it from there that way I could unload the drawing & not have the overhead while I'm working. Quote Link to comment Share on other sites More sharing options...
four_by_ken Posted November 9, 2007 Author Share Posted November 9, 2007 I need to digest this response a little bit. Quote Link to comment Share on other sites More sharing options...
four_by_ken Posted November 9, 2007 Author Share Posted November 9, 2007 I dont think this will get what I what to do. I need to have only one drawing for this. So, xref will require another drawing to be out there somewhere... which I cannot have. I need to have the original drawings on say layer 1. And this I will freeze and hide. But, before I do that, I need to copy it to layer 2. And this will become the working layer, where changes will be made without any effect to the original on layer 1. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 9, 2007 Share Posted November 9, 2007 I would either xref it or _WBLOCK it out to a new file and insert it as a block. Just so you will know, AutoCAD 2008 has the command "Copy Objects to New Layer". There may be a LISP out there somewhere. Quote Link to comment Share on other sites More sharing options...
halfcracked Posted November 9, 2007 Share Posted November 9, 2007 I dont think this will get what I what to do. I need to have only one drawing for this. So, xref will require another drawing to be out there somewhere... which I cannot have. I need to have the original drawings on say layer 1. And this I will freeze and hide. But, before I do that, I need to copy it to layer 2. And this will become the working layer, where changes will be made without any effect to the original on layer 1. Bind the xref it will combne the 2 drawings. If you make sure that you chose the bind option rather than the insert option AutoCad will add the xref name infront of all its layers. So what you'd do is: 1) In file explorer make a copy of your drawing & rename it. pick a short name like Orig.dwg 2) Now open the original file & xref the Orig.dwg in. 3) bind the xref using the BIND setting 4) delet the now un-needed orig.dwg 5) rinse & repeat Autocad will create new layers for all of the layers in the Orig.dwg calling them "Orig|layerx" "Orig|layery" etc... Now if you want eerything on one layer that's a little more troublesome. Quote Link to comment Share on other sites More sharing options...
CarlB Posted November 9, 2007 Share Posted November 9, 2007 Here's a short lisp routine to do that. You could set it up to automatically load (and maybe run) when you open a drawing. Test it first (defun c: c2lay () (setq NewLyr "NewLayerName");;edit to suit (setq ExLyr "ExistingLayername");;edit to suit (setq ExStuff (ssget "_X" (list (cons 0 ExLyr))));;selection set of everything on layer (command "layer" "m" NewLyr "");;creates/sets layer (command "copy" ExStuff '(0 0) "");;creates a copy on same layer (command "chprop" ExStuff "" "LA" NewLyr "");;changes orig to new layer (princ);clean exit ) Quote Link to comment Share on other sites More sharing options...
four_by_ken Posted November 10, 2007 Author Share Posted November 10, 2007 It was much easier than I expected. Here is what I did. open the drawing move everything to 'Layer 1" purge all create layer 2 copy everything to Layer 1 in the exact same location on layer 1 'change' previous selection (all that I just copied) to Layer 2 turn layer 1 off turn layer 2 on save Done deal. Routine takes about 30 seconds on 200 pages. Quote Link to comment Share on other sites More sharing options...
Strix Posted November 10, 2007 Share Posted November 10, 2007 so how exactly did you automate it? just incase anybody else needs that facility too :wink: Quote Link to comment Share on other sites More sharing options...
four_by_ken Posted November 10, 2007 Author Share Posted November 10, 2007 Just wrote a simple step by step xxxxx.scr file and ran it in AutoCAD. open xxxx.dwg change all layer layername ect etc ect ect Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 10, 2007 Share Posted November 10, 2007 Just wrote a simple step by step xxxxx.scr file and ran it in AutoCAD. open xxxx.dwg change all layer layername ect etc ect ect Did you use anything to create or make sure the layer you were moving to was there? Quote Link to comment Share on other sites More sharing options...
darwinland Posted October 27, 2016 Share Posted October 27, 2016 I found very useful the lisp routine on this thread. But does it work in autocad 2016. did anyone check it? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 27, 2016 Share Posted October 27, 2016 I found very useful the lisp routine on this thread. But does it work in autocad 2016. did anyone check it? In the time it took you to post your question you could have downloaded then tested the lisp routine thereby answering the question for yourself. The worst that can happen is that it fails to execute properly. Test on a copy of one of your drawings and not the original. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted October 27, 2016 Share Posted October 27, 2016 (edited) Sorry, misread OP. Edited October 27, 2016 by RobDraw Quote Link to comment Share on other sites More sharing options...
darwinland Posted October 27, 2016 Share Posted October 27, 2016 (edited) In the time it took you to post your question you could have downloaded then tested the lisp routine thereby answering the question for yourself. The worst that can happen is that it fails to execute properly. Test on a copy of one of your drawings and not the original. Of course I did, my aim was to ask if anyone has experimented the same issue and if there is a solution for it. I think is one of the most demanded routine for autocad and it appears doesnt exists. Using copylayer is very annoying bcz you first have to use quck select to copy the existed items. Edited October 27, 2016 by darwinland Quote Link to comment Share on other sites More sharing options...
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.