autolisp routine to change pagesetup

Discussion in 'AutoCAD' started by John Crocco, Jan 7, 2004.

  1. John Crocco

    John Crocco Guest

    I want to add automatically to my startup routines to change the pagesetup
    feature to have a different default plotter.

    EVERY time we go into someone elses drawing, or an old one of ours, we get
    the plotter not found error, very annoying.

    We have changed plotters, and would like to automatically change it when
    going into the drawing, instead of cancelling the error, and changing it
    manually.

    Tried to do it via lisp, but cant get the pagesetup or -pagesetuo, etc to
    work.

    I can write it, just dnt know the parameters needed to change it? what are
    the variables, for the default plotter device, or page setup?

    Do I need to do it in Vlisp?
     
    John Crocco, Jan 7, 2004
    #1
  2. John Crocco

    Steve Doman Guest

    John,

    Where I work, we use PC3 files and I have something like the following in
    our startup:

    ;;
    ;; For each layout in the drawing,
    ;; If the PC3 file is not our standard PC3,
    ;; replace it with "None"
    ;;
    (vlax-for layout
    (vla-get-layouts
    (vla-get-ActiveDocument (vlax-get-acad-object))
    )
    ;; Replace string with your standard PC3 file name
    (if (/= "YOUR.PC3" (strcase (vla-get-configname layout)))
    (progn
    (vlax-invoke-method layout 'refreshplotdeviceinfo)
    (vla-put-configname layout "None")
    )
    )
    )

    Regards,
    Steve Doman
     
    Steve Doman, Jan 9, 2004
    #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.