Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Page setup - Help

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
thavasi1982
492 Views, 3 Replies

Page setup - Help

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

 

3 REPLIES 3
Message 2 of 4
hofcad
in reply to: thavasi1982

Message 3 of 4
thavasi1982
in reply to: thavasi1982

Thanks boss
Message 4 of 4
Shneuph
in reply to: thavasi1982

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!

 

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost