Jump to content

Zoom lisp


Organic

Recommended Posts

Could somebody please create the following simple lips program or point me to one similar:

 

I press/type a single command and the following occurs: Zoom out to extents on all layouts and modelspace. Zoom out to 0.8x.

Link to comment
Share on other sites

I don't think this should be dificult but the only way I know to do it would involve switching to each layout to zoom extents. Is this OK?

 

Do you want all layouts and model space to be zoomed to .8x or just model space?

Link to comment
Share on other sites

All layouts and modelspace to be zoomed to .8x. Although preferably I'd like to do all layouts at once, not having to go to each layout and do it.

Link to comment
Share on other sites

here's something to play with and change to meet your needs

 

 
(defun c:loz (/ lolst llnt lcnt lnam)
(setq lolst (layoutlist));_get layout list
  (setq llnt (length lolst));_length of list
  (setq lolst (reverse lolst));_flip list
  (setq lcnt 0);_loop counter
  (while (< lcnt llnt);_loop
    (setq lnam (nth lcnt lolst))
    (command "layout" "set" lnam);_change to new layout
    (command "zoom" "e");_zoom extence
    (command "_mview" "lock" "on" "all" "");_locks all viewports
    (setq lcnt (1+ lcnt));_increase counter
    );_while
);_defun

Link to comment
Share on other sites

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...