Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lisp for translating the layers

Status
Not open for further replies.

Histor

Electrical
Mar 2, 2022
70
I have a drawing exported from 3D to 2D. In AutoCAD 2D Drawing all the layers needs to be laytransed to background layer (grey).

when I do laytrans, Some of the layers (LayerA and layerC), shall be excluded from above mentioned laytrans.

I am manually doing the laytrans. But I want some one of your help to get lisp for performing this activity.
 
Replies continue below

Recommended for you

A "script" (*.scr file) could probably handle this, depending on your layer naming convention.
Here's one site with info:
The script file would look something like:

layer
color
8 (or other background color)
*
color
(desired color here)
LayerA,layerc
(2 blank lines, to end the layer command)


Or if excluded layers should just keep original color, maybe this:

layer
lock
LayerA,layerc
color
8
*
unlock
LayerA,layerc
(2 blank lines, to end the layer command)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor