Message 1 of 17
Need Assistance Creating a Lisp To Set the Active Layout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a lisp to add to the acad startup suit that will force the first layout to become the active layout when the drawing is first opened.
Here is what I have so far, but it does not seem to do anything, nor does it generate an error:
Best Regards
-Tim C.
;; add this to the acad starup suit to force the first layout to be the active layout tab
(defun SetFirstLayoutActive ()
(vl-load-com)
(if (setq layout (car (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))))
(vla-put-ActiveLayout (vla-get-activedocument (vlax-get-acad-object)) layout)
(prompt "No layouts found.")
)
)
;; call example
;; (SetFirstLayoutActive)