Hi,
We are using this code for Page setup.
But We don,t know how to make this page setup current and active.
(defun c:pgs () (acet-error-init (list (list "cmdecho"0 "osmode" 0 ) T ) ) (vl-load-com) (setvar "Tilemode" 0) (vla-Add (vla-get-PlotConfigurations (vla-get-ActiveDocument (vlax-get-acad-object))) "A1" :vlax-false) (vla-put-PageSetupOverridesTemplateFile (vla-get-files (vla-get-preferences (vlax-get-acad-object))) "A1") (setq item (vla-Item (vla-get-PlotConfigurations (vla-get-ActiveDocument (vlax-get-acad-object))) 0)) (vla-put-configname item "\\\\inchenas04\\INCHENPL001") (vla-put-canonicalmedianame item "user5031") (setq p1 (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble '(0 . 1)) (list 0.0 0.0))) (setq p2 (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble '(0 . 1)) (list 841.0 594.0))) (vla-setwindowtoplot item p1 p2) (vla-put-plottype item acwindow) (vla-put-centerplot item 1) (vla-put-standardscale item ac1_1) (vla-put-stylesheet item "mm-standard.ctb") (vla-put-plotwithplotstyles item :vlax-true) (vla-put-plotviewportsfirst item :vlax-false) (vla-put-plotrotation item ac0degrees) (vla-put-plotrotation item ac270degrees) (ACET-ERROR-RESTORE) );defun
Please help in this regards
Thanks in advance
STM
Solved! Go to Solution.
Solved by thavasi1982. Go to Solution.
Solved by hofcad. Go to Solution.
I was just doing something where I need to set a plotconfiguration object current to the modelspace layout and I got stuck on this as well. A PROPERTY called Layout that's read-write but no vla-put-layout and no other notes on how to do it??
vla-copyfrom is what you have to use!