Script to Clean Architectural Backgrounds

Script to Clean Architectural Backgrounds

iabonce
Explorer Explorer
1,104 Views
2 Replies
Message 1 of 3

Script to Clean Architectural Backgrounds

iabonce
Explorer
Explorer

I need to come up with a script to simplify the cleaning of architectural backgrounds. I have the basics down but need help when needed to merge multiple layers into one. For example, I'm looking to set all layers that contain "wall" to a layer called "x-wall". Can someone share their script or provide guidance to the best way to accomplish this?

0 Likes
Accepted solutions (2)
1,105 Views
2 Replies
Replies (2)
Message 2 of 3

CodeDing
Advisor
Advisor
Accepted solution

@iabonce,

 

It appears @alanjt_ has provided a great function for this matter HERE. I am unable to test it at the moment, but calling it would be something like...

(defun c:TEST ( / )
(_LayMrg "*wall*" "x-wall")
);defun

Best,

~DD

Message 3 of 3

dbhunia
Advisor
Advisor
Accepted solution

For script .... Try like this for single layer.....(tested in Autocad 2007)

 

_LayMrg n wall

n x-wall
y

 

For lisp ..... Try like this for multiple layer...(tested in Autocad 2007)

 

(defun c:TEST ( / sset)
(setq sset (ssget "_A" '((8 . "*wall*"))))
(command "_chprop" sset "" "LA" "x-wall" "")
)

 

Or you can use this above lisp directly in script .....like....

 

(setq sset (ssget "_A" '((8 . "*wall*"))))
(command "_chprop" sset "" "LA" "x-wall" "")

 


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