For a batch plot application (VB executable), I need to be able to change
the papersize for the plot. I wrote a little application to printout both
the Canonical media names and Local Media Names for a specific device just
so that I would have a comparable list of the papersizes in both formats.
If I specify the name of the plot using a Canonical Name (eg. User168) I
have no idea what size this is and if I use the Locale Name (eg. Letter), do
I have to convert it back to a canonical name since the property of the page
size is LayoutObject.CanonicalMediaName.
Thanks,
Ryan Small
--
Rodney McManamy - President
MACSolids - Maximizing AutoCAD Solids
website: www.macsolids.com
"Ryan Small" <ry...@solidcadcam.com> wrote in message
news:2F266C99A6887140...@in.WebX.maYIadrTaRb...
Like the original poster, the documentation I've read on this topic is just
plain bizarre, IMO.
Rodney McManamy <mcma...@worldnet.att.net> wrote in message
news:99561FA066E9C0A3...@in.WebX.maYIadrTaRb...
--
Rodney McManamy - President
MACSolids - Maximizing AutoCAD Solids
website: www.macsolids.com
"TomD" <dcbne...@nospam.stargate.net> wrote in message
news:5E89894F401829FA...@in.WebX.maYIadrTaRb...
As was stated in some of the earlier messages, the CanonicalMediaName is
basically an internal variable representing the various sheet sizes
available. You can establish the relationship between the two with the
"vla-getlocalemedianame" function.
Assuming that you already have the string for the sheetsize (as displayed in
the plot dialog) assigned to the variable "sht-sz" and have Plot Object set
to the variable "objPlotConfig" this code that I use will tranlate the
sht-sz into the canonicalmedianame and set the value for the plot.
(setq medialist (mapcar '(lambda (x)
(list (vla-getlocalemedianame objPlotConfig
x)
x
) )
(vlax-safearray->list (vlax-variant-value
(vla-getCanonicalMediaNames objPlotConfig)))
) )
(if (or (null sht-sz)
(/= (type sht-sz) 'STR)
(not (setq sht-sz (cadr (car (vl-member-if '(lambda (x)
(wcmatch (strcase
(car x)) (strcase sht-sz))
)
medialist
) ) ) ) ) )
(progn
(alert
(strcat "Invalid or empty SHEET SIZE specified!"
"\nPlotting ABORTED!"
"\n\n" sht-sz
) )
(quit)
)
(vla-put-CanonicalMediaName objPlotConfig sht-sz)
)
"TomD" <dcbne...@nospam.stargate.net> wrote in message
news:5E89894F401829FA...@in.WebX.maYIadrTaRb...