and the rest ?Originally Posted by CAB2k
: ) Happy Computing !Originally Posted by kennet.sjoberg
kennet
|
and the rest ?Originally Posted by CAB2k
: ) Happy Computing !Originally Posted by kennet.sjoberg
kennet
Here is one I wrote a while back to accomplish this very task. It's not perfect, it will leave a few bound layers sometimes. Though I have found that EVERY object is converted, it just can't get rid of the layers because they are stuck in a block (that wasn't created correctly) or one of the other many reasons why a layer cannot be purged. When I wrote this I didn't have the time to research it enough, plus it takes care of all the objects (which is what I wanted) so I was happy. Try it out and let me know. Feel free to modify it if need be.
Ty
Last edited by tyshofner; 2006-01-11 at 05:22 PM.
Hey Kennet,Originally Posted by kennet.sjoberg
My post was in response to this request.
It will rename the layers as requested.Originally Posted by kylec_edg
I did not say it was a panacea for all the problems that may exist.
Thank you,
Yes, that is true,Originally Posted by CAB2k
but I suppose Kyle do not know about the rest of the problems that "bind as bind" cause,
. . .but it exists routines that fix that to .
: ) Happy Computing !
kennet
did anybody try that lisp?
before i try it can you explain breifly how it works?
John,
If you are referring to my lisp it only renames the layers.
It would rename these as follows:
Aproved Title Block D$0$xHEAVY
xref block test$0$TestLayer01
changed to this:
X1-xHEAVY
X2-TestLayer01
John,
If you were asking about my LISP??
It will scan all the objects in a drawing (including inside blocks), check to see if they are on a bound layer, i.e. X01-AFP$0$A-WALL, if the object is on a bound layer it will remove the binding info from the layer name, check the layer table to see if that layer already exists, if it exists the object is moved to that layer. If the layer does not exist then it will grab the layer information from the bound layer (color, linetype, etc.) and make a new layer with the correct name, i.e. A-WALL, and then move the object to that layer. Once through all the objects it purges the drawing to remove the bound layers.
Ty
both lisps are cool...... but i think this one will have larger benefits for translating architecture to our layering style, translating base maps etc. layertranslater is great if both drawings have the same layer names... however mapping every time you translate sucks and it would be great to see if this would work to translate x layer to y layer and force all objects on x layer to be y layer 'bylayer'Originally Posted by tyshofner
how do you actually "do" the mapping of x layer to y layer?
This is the actual piece of code that moves the object to the new layer.Originally Posted by johnh.101098
What exactly do mean by "translate" to your layers? Are you wanting to, after the bound layers have been fixed, then "translate" those layers to your layering standard, or am I missing something?Code:(setq obj_alst (subst (cons 8 obj_lyr_new) (assoc 8 obj_alst) obj_alst)) (entmod obj_alst)
Ty
well it sounds like you are removing parts of the layer names... so how does it find what part of the layer name to remove so that you could potentially find layers with a given name and then convert them to another name, as a routine.
so everytime i get a drawing from joe pie his layers have a routine that get translated through this routine from say...
point-dumb to pnt-misc
x-epcurb to x-curb
x-ep to x-eop
etc etc etc. your routine seems close to that, it's finding something in the layername using some sort of list, removing the names from the layers all at once instead of editing them by hand.