Jump to content

Recommended Posts

Posted

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

Posted

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)

)

Posted

Thaw multiple thaw a* use wildcard option * any layer starting with a

 

Also thaw "0,2,a*" is a valid option for 3+ layers

Posted
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?

Posted

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")

))

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...