Message 1 of 3
Run command on drawing opening on modelspace. I

Not applicable
04-01-2016
03:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can i make LISP command run on Model Space. It is currently running on ActiveLayout. and Im getting the zoomextends version of the Layout view. I want the zoom extends version of the Model Space. Thanks in Advance.
Here is the code i used. i want this code to be altered to work on modelspace rather than layout
(defun c:ZEA (/ acad acdoc aclay)
(vl-load-com)
(setq acad (vlax-get-acad-object)
acdoc (vla-get-ActiveDocument acad)
aclay (vla-get-ActiveLayout acdoc)
)
(vlax-for layout (vla-get-Layouts acdoc)
(vla-put-ActiveLayout acdoc layout)
(vla-ZoomExtents acad)
)
(vla-put-ActiveLayout acdoc aclay)
(princ)
)
(C:ZEA)