pennkraft Posted July 9, 2016 Posted July 9, 2016 Hello, Im new to lisp and im trying to create a lisp program that goes through my typical layout tabs and sets up the layers to be frozen or thawed. I would like to switch to each layout tab and set things up automatically 1. set to model space 2. thaw the layers needed Leaving layer 1 on at all times for the border. and skip error's if a layout tab is missing. (setvar "ctab" "front elevation")(command "_.mspace")(command "vplayer" "f" "~1" "")(command "vplayer" "thaw" "e" "") (princ)) (setvar "ctab" "rear elevation")(command "_.mspace")(command "vlayer" "f" "~1" "")(command "layer" "thaw" "er" "") (princ)) (setvar "ctab" "right elevation")(command "_.mspace")(command "vlayer" "f" "~1" "")(command "-layer" "thaw" "es" "") (princ))(ignore-errors) Can anyone here help me to get started? Thanks Quote
pennkraft Posted July 9, 2016 Author Posted July 9, 2016 the next question would be, how do I thaw multiple layers? (defun c:Test nil (if (member "FRONT ELEVATION" (layoutlist)) ; it's case sensitive (progn (setvar "ctab" "FRONT ELEVATION") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "e" "" "") )) (if (member (strcase "REAR ELEVATION") (mapcar 'strcase (layoutlist))) ; not case sensitive (progn (setvar "ctab" "REAR ELEVATION") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "er" "" "") )) (if (member "RIGHT ELEVATION" (layoutlist)) (progn (setvar "ctab" "RIGHT ELEVATION") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "es" "" "") )) (if (member "1ST FLOOR PLAN" (layoutlist)) (progn (setvar "ctab" "1ST FLOOR PLAN") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "0" "" "" "thaw" "2" "" "" ) )) (setvar "ctab" "COVER") (princ) ) Quote
BIGAL Posted July 10, 2016 Posted July 10, 2016 Thaw multiple thaw a* use wildcard option * any layer starting with a Also thaw "0,2,a*" is a valid option for 3+ layers Quote
iconeo Posted July 10, 2016 Posted July 10, 2016 http://www.lee-mac.com/steal.html I would just set it up once (just like a template system) and then use Lee Mac's excellent Steal program. It is how I have my office setup. Quote
pennkraft Posted July 10, 2016 Author Posted July 10, 2016 http://www.lee-mac.com/steal.html I would just set it up once (just like a template system) and then use Lee Mac's excellent Steal program. It is how I have my office setup. That is what I'm doing,, setting up a template system. I have more luck with bland.lsp, vs steal (if (member (strcase "REAR ELEVATION") (mapcar 'strcase (layoutlist))) ; not case sensitive (progn (setvar "ctab" "REAR ELEVATION") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "er" "" "") (command "-vports" "Lo" "on" "ALL" "") (command "zoom" "e") )) Would it be possible to have the left hand corner of the layout tab view at 0,0 And scale the drawing to 3/16" = 1" before I lock and zoom extents? Quote
pennkraft Posted July 10, 2016 Author Posted July 10, 2016 I'm still trying to get the lower left corner of the view port to stay at 0,0 when I zoom to scale. (if (member "COVER" (layoutlist)) ; it's case sensitive (progn (setvar "ctab" "COVER") (if (= (getvar "cvport") 1) (command "_.mspace")) (command "_.vplayer" "f" "~1" "" "thaw" "COVER" "" "") (command "-vports" "Lo" "off" "ALL" "") (command "zoom" (strcat "1/48" "" "XP")) ; = 1/4" scale viewport (command "-vports" "Lo" "on" "ALL" "") (command "zoom" "e") )) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.