Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how can i regognize is the layer close or open?

3 REPLIES 3
Reply
Message 1 of 4
PonuryGrzybiarz
195 Views, 3 Replies

how can i regognize is the layer close or open?

i want to make a function which closing layer of selected object

i suppose i use entities but i dont know what is meaning of these numbers

((-1 . ) (0 . "LWPOLYLINE") (330 .
7efc2cf8>) (5 . "3A4E") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"dims") (100 . "AcDbPolyline") (90 . 2) (70 . 0) (43 . 0.0) (38 . 0.0) (39 .
0.0) (10 132055.0 21473.7) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 134597.0
21473.7) (40 . 0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0))
3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: PonuryGrzybiarz

Hi PonuryGrzybiarz

try this...

(defun c:test( / lc)
(princ "\nSelect one object in the LAYER to be current ")
(setq lf (cdr (assoc 8 (entget ( car (entsel))))));;<-- dxf 8 is the layer, In your exemple it was (8 . dim)
(princ "\n")
(command "Layer" "s" lf"")
(PRINC)
)

Cheers

Henrique

EESignature

Message 3 of 4

hmm works good but what should i do next? now i have a name of layer (i use it in other functions), so i can do something with it, but which command shows me entities of layer?

i want to make a function which with one button locks unlocked layers and unlocks locked and i need this status
Message 4 of 4
hmsilva
in reply to: PonuryGrzybiarz

Sorry I did read your post very fast....

to see if a layer is lock, you must go to goup code 70 and see
if the bit-code value is =4... if so it means the layer is locked...

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost