Where is the Plotters Collection

Discussion in 'AutoCAD' started by DonB, Jul 10, 2003.

  1. DonB

    DonB Guest

    r2004

    Can someone tell me where the collection of all defined plotters would be
    located?

    Thanks alot,

    Don
     
    DonB, Jul 10, 2003
    #1
  2. (vla-get-plotconfigurations
    (vla-get-activedocument
    (vlax-get-acad-object)))

    ?
     
    Jason Piercey, Jul 10, 2003
    #2
  3. DonB

    DonB Guest

    Actually, I've tried that but it only returns a collection one item in
    length (at least on my machine).

    What I'm trying to do is to get the same list that you see in "Page Setup /
    Plot Device / Plotter Configuration / Name" dropdown list.

    Thanks,

    Don
     
    DonB, Jul 10, 2003
    #3
  4. In that case,

    ; based on an example by Doug Broad
    ; obtain a list of available printers/plotters
    ; return: list of strings or nil
    (defun getPlotDevices (/ hide layout)
    (if (setq hide (= "1" (getenv "HideSystemPrinters")))
    (setenv "HideSystemPrinters" "0") )
    (setq layout (vla-get-activelayout *doc*))
    (vla-refreshplotdeviceinfo layout)
    (if hide (setenv "HideSystemPrinters" "1"))
    (vlax-invoke layout 'getplotdevicenames)
    )


    ; file dependencies
    ; getPlotDevices.lsp
    (defun getPC3Devices (/ lst)
    (if (setq lst (getPlotDevices))
    (vl-remove
    "None"
    (vl-remove-if-not
    '(lambda (x) (wcmatch x "*.pc3"))
    lst
    )
    )
    )
    )
     
    Jason Piercey, Jul 10, 2003
    #4
  5. DonB

    DonB Guest

    Hey Cool!

    I didn't know about the environment setting.

    Thanks!

    Don
     
    DonB, Jul 11, 2003
    #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.