Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to read Layer in AutoLisp

How to read layer from poline?

e.g with this i can get (8. "LAYER_NAME") but i wanna see onyl LAYER_NAME because I want to later check by name something

(defun c:test ( / ent enx )
    (if (setq ent (car (entsel)))
        (progn
            (setq enx (entget ent))
            (assoc 8 enx)
        )
    )
)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Change the line

(assoc 8 enx)

to

(cdr (assoc 8 enx))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading