0 Members and 1 Guest are viewing this topic.
(defun younameit (laylist option / doc ct ln) (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object) ) ct (vla-get-activelayout doc) ) (vlax-map-collection (vla-get-layouts doc) '(lambda (x) (if (/= (vla-get-name x) "Model") (progn (setvar 'ctab (vla-get-name x)) (foreach ln laylist (if (tblsearch "layer" ln) (command ".vplayer" option ln "all" "") (princ (strcat "\nYour layer " ln " does not exist!")) ) ) ) ) ) ) (vla-put-activelayout doc ct) (princ))(younameit '("layname1" "layname2" "layname3") "freeze");;Where the last option is Freeze/Thaw/Reset/Newfrz/Vpvisdflt
I'm sorry, I don't know how to use the code. Do I copy and paste the entire text that's in the code field into the command line? If so, what do I do then?Thank you, kc
Thank you. I don't know how to load the upper portion into acad. It's ok though. Maybe it's just gonna be easier to go to each layout tab and freeze them individually. I appreciate your effort though, and I wish I wasn't so dumb.kc
Thanks dfarris75, much appreciated! ronjonp, the three layers I want to freeze this time are C-IMP, Construction Lines, and C-XSPOT.
Download the file and drag it into your ACAD screen.