PRINTER SETUP

Discussion in 'AutoCAD' started by JFREED, Sep 20, 2004.

  1. JFREED

    JFREED Guest

    Is there a LISP program to set the printer configuration into a series of drawings? I receive >500 drawings from a customer and I want them to all be set to plot to a specific printer using a known size, orientation, etc.
     
    JFREED, Sep 20, 2004
    #1
  2. Check out creating a script file using the command line prompts to print...


    drawings? I receive >500 drawings from a customer and I want them to all be
    set to plot to a specific printer using a known size, orientation, etc.
     
    HMS Engineering, Sep 20, 2004
    #2
  3. JFREED

    Josh Guest

    In addition to scripts you could try writing a lisp that uses -psetupin to
    bring in a predefined pagesetup from another drawing on a per drawing basis:
    (command "-psetupin" "<yourpath>\\pagesetup.dwg" "<pagesetupname>")
    (command "-PLOT" "No" "" "<pagesetupname>" "" "n" "y" "y")

    One caveat is that the predefined pagesetup will have the plot area already
    defined ie. Window, Display, Extents, etc. So, if all the customer drawings
    are in the same place in each drawing then -psetupin and pagesetups might be
    an option for you.


    drawings? I receive >500 drawings from a customer and I want them to all be
    set to plot to a specific printer using a known size, orientation, etc.
     
    Josh, Sep 21, 2004
    #3
  4. If you do this, it will crap out on you if the page setup is already defined
    in the drawing unless you change the 'EXPERT' variable (If I remember
    correctly)
     
    Casey Roberts, Sep 21, 2004
    #4
  5. JFREED

    Josh Guest

    Good point....You can also check for and delete the pagesetup with the
    following (from J. Piercey I think...if the pagesetup doesn't exist no error
    will occur):

    (defun delpagesetup (name / cfgs)
    (setq cfgs (vla-get-plotconfigurations
    (vla-get-activedocument (vlax-get-acad-object))
    )
    )
    (cond
    ((vl-string-search "*" name)
    (vlax-for x cfgs
    (if (wcmatch (vla-get-name x) name)
    (vla-delete x)
    )
    )
    )
    (t
    (vl-catch-all-apply '(lambda () (vla-delete (vla-item cfgs name))))
    )
    )
    (princ)
    )
     
    Josh, Sep 21, 2004
    #5
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.