How can we update all layouts with the same page setup quickly ?

How can we update all layouts with the same page setup quickly ?

cyberflow
Advisor Advisor
671 Views
1 Reply
Message 1 of 2

How can we update all layouts with the same page setup quickly ?

cyberflow
Advisor
Advisor

Hi,

I've got a page layout called "A1-Project" and would like to apply it on all my tabs without going thru each one, one at a time.

Anyone know and effective workflow ?
Or even a hidden command.

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Accepted solutions (1)
672 Views
1 Reply
Reply (1)
Message 2 of 2

ronjonp
Mentor
Mentor
Accepted solution

Give this a try. Go to your current tab that has the settings you want, then run the code.

(defun c:foo (/ a d)
  ;; RJP » 2021-07-19
  ;; Applies current paperspace tab settings to all layouts
  (if (= (getvar 'cvport) 1)
    (progn (setq d (vla-get-activedocument (vlax-get-acad-object)))
	   (setq a (vla-item (vla-get-layouts d) (getvar 'ctab)))
	   (vlax-for tab (vla-get-layouts d)
	     (if (> (vlax-get tab 'taborder) 0)
	       (progn (vl-catch-all-apply 'vla-copyfrom (list tab a))
		      (vlax-invoke tab 'refreshplotdeviceinfo)
	       )
	     )
	   )
    )
    (alert "GO TO A PAPERSPACE TAB!")
  )
  (princ)
)
0 Likes