Automate Entity Conversion: Move Entities to Layer Zero Maintain Original Properties
Goal:
Find methods to help assemble a new LISP program or find an existing LISP program to perform the following:
Convert all entities to layer zero while maintaining properties as originally assigned based on the entities' original layer.
Details:
In a single DWG file, 700+/- details are organized and include drawing borders that supply individual details to our main non-Autodesk specialized and multi-functional design application.
Please provide:
- Links to and/or actual LISP programs that perform this or similar conversions.
- LISP tips and/or instruction on links to methods to create a conversion LISP program.
- Non-programmed methods to accomplish this conversion.
(Almost a) LISP Beginner
0
Comments
-
I do something like that, using the two custom commands in the attached lisp file. In files that I get from other people, I use the those commands to eliminate all Bylayer color and linetype, giving each entity the color and linetype it would have on its current layer. Then I can move them to any layer without losing their color and linetype. I don't move all entities to layer 0, but that's easy to do using the Entity Properties pull-down list (if that still exists in v24).
In drawings I get from other people, lineweight is usually Bylayer for all entities, but the layer lineweight for all layers is usually Default; so that's no help. But I have a custom command that selects all entities of a particular color, and for each of colors 1 to 7 a custom command that selects all entities of that color, plus a custom command that gives those entities the lineweight that's associated with that color in my CTB file.0 -
And the two custom commands in this lisp file do the same thing but for the entire DWG file, not just for the selection set.0
-
These are great programs, Anthony!
Thanks,
Clint0