I'm exploring how to use Visual Lisp to specify a specific plot configuration if it isn't already specified; but, I am confused by the information I am getting from GetCanonicalMediaNames. The specified device "TIFF Version 6 (CCITT G4 2D Compression).pc3" has several user defined custom paper sizes but none of them are included in the list of Canonical Media Names: Some have the same pixel dimensions but not all of the "UserDefinedRaster" pixel dimensions match paper sizes I've added. Most notably the one size I use the most which I named "34x22 288dpi (9792,00 x 6336.00 Pixels)" is absent.
What is the connection between the paper sizes I am getting and the paper sizes that exist in the .pc3 file, if any?
Where are these GetCanonicalMediaNames paper sizes coming from?
Here is what I am getting from GetCanonicalMediaNames for my "TIFF Version 6 (CCITT G4 2D Compression).pc3" device:
UserDefinedRaster (12906.00 x 8640.00Pixels)
UserDefinedRaster (8640.00 x 6912.00Pixels)
UserDefinedRaster (4896.00 x 6336.00Pixels)
UserDefinedRaster (3168.00 x 2448.00Pixels)
UserDefinedRaster (7776.00 x 5184.00Pixels)
UserDefinedRaster (6336.00 x 4896.00Pixels)
UserDefinedRaster (9072.00 x 6480.00Pixels)
Sun_Hi-Res_(1600.00_x_1280.00_Pixels)
XGA_Hi-Res_(1600.00_x_1200.00_Pixels)
etc.
Solved! Go to Solution.
Coop,
Use vla-GetLocaleMediaName to get the paper sizes as you have saved them for the printer.
I use the following code:
;gets the paper sizes for the plotter/layout
(setq canon_size (vlax-safearray->list(vlax-variant-value(vla-GetCanonicalMediaNames (alay)))))
;gets the local paper sizes for the printer
(foreach ps canon_size
(setq paper_size (cons (vla-GetLocaleMediaName (alay) ps) paper_size))
);end for
where (alay) is the current active layout, paper_size will be a list containing all of the paper as you have named them.
Can't find what you're looking for? Ask the community or share your knowledge.