AutoLISP to Batch Change Multiple Layers or LayerState on Multiple Drawings

AutoLISP to Batch Change Multiple Layers or LayerState on Multiple Drawings

Anonymous
Not applicable
1,125 Views
1 Reply
Message 1 of 2

AutoLISP to Batch Change Multiple Layers or LayerState on Multiple Drawings

Anonymous
Not applicable

Hi,

I've been searching online for a while now, but can't seem to find what I'm looking for.

Basically what I'm trying to do is freeze/thaw multiple layers or change layerstates across multiple drawings without having to open all of them.

Ex.
Freeze layers 1, 2, 3, 4 and Thaw layer 5 on all .dwgs in a specific folder.
Thaw layers 1, 2, 3, 4, and Freeze layer 5 on all .dwgs in a specific folder.
Thaw layers 1, 2, 3, 4, 5 on all .dwgs in a specific folder.

or
Change layer state to E-ON on all .dwgs in a specific folder.
Change layer state to E-OFF on all .dwgs in a specific folder.
Change layer state to E-ALL on all .dwgs in a specific folder.

Full disclosure, I'm not new to AutoLISPs, but am still a novice.

Thank you in advance.

0 Likes
1,126 Views
1 Reply
Reply (1)
Message 2 of 2

dbhunia
Advisor
Advisor

Try the attached lisp to "Freeze or Thaw" Multiple Layers in Batch ........

 

Put your all Drawings in a folder ......... Just select the Folder when asked to select and go through the steps .......

 

But before running the Lisp make sure about two things-

       1. There is only one Drawing is open, otherwise SDI Variable can not be reset.

       2. Wait for complete execution of the command, otherwise SDI Variable will not restored back.

 

Hopefully you can modify in the code as per your requirements.....

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes