Pagesetup problem

Kevin

Usenet Archive
Joined
Feb 21, 2000
Messages
70
Reaction score
0
Is there a way (with lisp) to initialize the Pagesetup command and then cancel out of it with no user interaction?

I have a script w/lisp routines to do some conversions and printing of a lot of files and everything works great except we have run into some old R13 files.

The real problem is that I'm trying to get the page orientation. i.e.
Landscape or Portrait.

The following code gets me that info for R14 and newer files:

(setq Plot_Rot (vla-get-PlotRotation (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object))))) (if (= Plot_Rot 1) (setq CurrOrient "Landscape") (setq CurrOrient "Portrait")
)

With R13 files it just returns Portrait even when the drawing is landscape. However, when I initialize the Pagesetup command and then cancel right out of it, it then recognizes that it is landscape.

Any ideas?

Kevin
 
Kevin,
I just got through working on my start drawing lisp which accessed these functions (see post 8-25 "anyone know how to set pagesetup settings from LISP?"). I wonder if setting a different or specialized .pc3 file to the tab first might help, then run something like (vlax-invoke "_YourActiveLayout_" "RefreshPlotDeviceInfo"). Just a thought...
 

Latest threads

Back
Top