Search the Community
Showing results for tags 'thawed'.
Found 1 result
Troispistols posted a topic in AutoLISP, Visual LISP & DCLHi, I found and modify a lisp routine, I would like to know if it is on the right track. Also to mention that I don't really understand all the mechanics of it but first, here's what I want to achieve : -I have a Layer named "Arch - Niveau 1" -I would like to enter in the command prompt "a11" -It would read if the layer is frozen or thawed and if it is frozen, it will thaw it (? sorry bad english) And if the layer is thawed, it would freeze it That's it! What could be added is: To check up if the layer exists and if not, create it. Would do the same for 2 other layer named "Arch - Niveau 2" command "a22" and "Arch - Niveau 3" command "a33". Is it clear? Now the lisp I've found and modified is this: (defun c:a11 (/ lay ldef flag) (setq layn "Arch - Niveau 1") (command "_.LAYER") (if (not (tblsearch "LAYER" layn)) (command "_Make" layn) (progn (setq ldef (tblsearch "LAYER" layn) flag (cdr (assoc 70 ldef))) (and (= (logand flag 1) 1) (command "_Thaw" layn)) )) (command "") ) This lisp looks if it exists, if not, create it and only thaw the layer. I'm not sure I want to understand all the mechanics because I'm not enough familiar with the "not", the "progn" the "flag", "and" and "logand" (!!!!) Can you help me complete my lisp please? Thanks a lot !