Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Confusion regarding Layout info, plot device, and GetCanonicalMediaNames

1 REPLY 1
SOLVED
Reply
Message 1 of 2
coopdetat
923 Views, 1 Reply

Confusion regarding Layout info, plot device, and GetCanonicalMediaNames

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.

---------------------------------------------Signature--------------------------------------------
Civil Design Professional Since 1983 (Intergraph), AutoCAD since 1989

Windows 10 Pro 64-bit Intel﴾R﴿ Core﴾TM﴿ i9-12900KF CPU 3.19GHz; 32 GB DDR4 4266 Dual Channel RAM
nVidia Quadro RTX 4000; AutoCAD Civil 3D 2023.2.1 Update
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: coopdetat

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.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report