Pagesetup problem

Discussion in 'AutoCAD' started by Kevin, Aug 26, 2003.

  1. Kevin

    Kevin Guest

    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, Aug 26, 2003
    #1
  2. Kevin

    rapidcad Guest

    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...
     
    rapidcad, Aug 26, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.