LISP : select line in specific layer and change...

LISP : select line in specific layer and change...

RémiL
Collaborator Collaborator
2,884 Views
6 Replies
Message 1 of 7

LISP : select line in specific layer and change...

RémiL
Collaborator
Collaborator

Hi ! Little designer here.

I'm looking to create LISP file to automate some tasks :

 

How to be able to select all the lines of the layer "Wall" and modify them in color "by layer" ?

 

Thx in advance for your feedback

 


Remi L.
Modeleur Revit Structure

Logo_Betrec_petit_format
0 Likes
Accepted solutions (1)
2,885 Views
6 Replies
Replies (6)
Message 2 of 7

Moshe-A
Mentor
Mentor

Remi,

 

why create a lisp when AutoCAD gives all the tools you need to do that by your own

look at QSELECT  (or FILTER) commands. after you select all objects in layer "Wall" change their color with properties toolbar or ribbon or properties palette.

 

cheers

moshe

 

0 Likes
Message 3 of 7

RémiL
Collaborator
Collaborator

Hi @Moshe-A

Because I have several manipulations of this kind to do on hundreds of files Smiley LOL


Remi L.
Modeleur Revit Structure

Logo_Betrec_petit_format
0 Likes
Message 4 of 7

Moshe-A
Mentor
Mentor
Accepted solution

check this:

 

(defun c:byl (/ ss)
 (if (setq ss (ssget "_x" '((8 . "wall"))))
  (command "_.chprop" "_si" ss "_color" "_bylayer" "")
 )
 (princ)
)
0 Likes
Message 5 of 7

RémiL
Collaborator
Collaborator

AutoCad say me :

the object is not in the current space

Remi L.
Modeleur Revit Structure

Logo_Betrec_petit_format
0 Likes
Message 6 of 7

Moshe-A
Mentor
Mentor

you need to be in model space

0 Likes
Message 7 of 7

RémiL
Collaborator
Collaborator

Yes i'm there Smiley Frustrated

 

EDIT : ok it's done !!! Thx a lot


Remi L.
Modeleur Revit Structure

Logo_Betrec_petit_format
0 Likes