Secure available paper size for device.

Discussion in 'AutoCAD' started by Andrew McDonald, Jan 19, 2004.

  1. I'm using the code below to retrieve the device name and media size, but
    specifically
    for one of our devices a Cadjet 2 the paper sizes are defined as
    "ARCH A 9" x 12""
    "ISO A0 840 x 1189 mm."
    "ISO A1 594 x 840 mm."
    "ISO A2 420 x 594 mm."
    "ISO A3 297 x 420 mm."
    "ISO A4 210 x 297 mm."
    etc.

    but the script I'm using doesn't allow (or recognize) "ISO A1 594 x 840
    mm." or ISO A1 594 x 840 mm.
    or "User265" as reported by (GetCanonicalMediaNames).

    Has anybody come across this problem and had any luck in resolving.

    ----------------------------------------------------------------------------
    ---------------------------------------------
    (defun GetPlotDevices (/ ad)
    (setq ad (vla-get-activedocument (vlax-get-acad-object)))
    (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))
    (vlax-safearray->list (vlax-variant-value (vla-getplotdevicenames
    (vla-item (vla-get-layouts ad) "Model"))))
    )

    (defun GetCanonicalMediaNames (/ ad)
    (setq ad (vla-get-activedocument (vlax-get-acad-object )))
    (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))
    (vlax-safearray->list (vlax-variant-value (vla-GetCanonicalMediaNames
    (vla-item (vla-get-layouts ad) "Model"))))
    )
     
    Andrew McDonald, Jan 19, 2004
    #1
  2. Andrew McDonald

    mark Guest

    vla-GetLocaleMediaName
    of the canonical media name
    HTH
     
    mark, Jan 19, 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.