Secure available paper size for device.

Andrew McDonald

Usenet Archive
Joined
Jul 9, 2003
Messages
27
Reaction score
0
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"))))
)
 

Latest threads

Back
Top