<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Actual papersize? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675749#M150635</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Maybe this can help&lt;BR /&gt;
&lt;BR /&gt;
;-------------------------------------------------------------GetCanonicalMediaNames--------------&lt;BR /&gt;
(defun GetCanonicalMediaNames (/ ad)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object )))&lt;BR /&gt;
  (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))&lt;BR /&gt;
  (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-GetCanonicalMediaNames (vla-item (vla-get-layouts ad) "Model"))))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------GetLocaleMediaName------------------&lt;BR /&gt;
(defun GetLocaleMediaName (pd / ad la al)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object))&lt;BR /&gt;
        la (vla-item (vla-get-layouts ad) "Model")&lt;BR /&gt;
	al (vla-get-activelayout ad)&lt;BR /&gt;
  )&lt;BR /&gt;
  (vla-put-configname al pd)&lt;BR /&gt;
  (princ "\n\n\nSetting:\n")&lt;BR /&gt;
  (princ (showDeviceProp al))&lt;BR /&gt;
  (princ "\n\n\nMedia:\n")&lt;BR /&gt;
  (mapcar '(lambda(mn)(vla-GetLocaleMediaName la mn)) (GetCanonicalMediaNames))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------GetPlotDevices----------------------&lt;BR /&gt;
(defun GetPlotDevices (/ ad)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object)))&lt;BR /&gt;
  (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))&lt;BR /&gt;
  (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-getplotdevicenames (vla-item (vla-get-layouts ad) "Model"))))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------showDeviceProps----------------------&lt;BR /&gt;
(defun showDeviceProp (actlay / cusscl Numerator Denominator papmrg LowerLeft UpperRight papsiz Width Height window LLeft URight pltConfigLst)&lt;BR /&gt;
  (setq cusscl (vla-GetCustomScale actlay 'Numerator 'Denominator)&lt;BR /&gt;
        papmrg (vla-GetPaperMargins actlay 'LowerLeft 'UpperRight)&lt;BR /&gt;
        papsiz (vla-GetPaperSize actlay 'Width 'Height)&lt;BR /&gt;
        window (vla-GetWindowToPlot actlay 'LLeft 'URight)&lt;BR /&gt;
  )&lt;BR /&gt;
  (setq  pltConfigLst  (list (cons "ConfigName" (vla-get-Configname actlay))&lt;BR /&gt;
       (cons "StyleSheet" (vla-get-StyleSheet actlay))&lt;BR /&gt;
       (cons "CanonicalMediaName" (vla-get-CanonicalMediaName actlay))&lt;BR /&gt;
       (cons "CenterPlot" (vla-get-CenterPlot actlay))&lt;BR /&gt;
       (cons "PaperUnits" (vla-get-PaperUnits actlay))&lt;BR /&gt;
       (cons "PlotHidden" (vla-get-PlotHidden actlay))&lt;BR /&gt;
       (cons "PlotRotation" (vla-get-PlotRotation actlay))&lt;BR /&gt;
       (cons "PlotType" (vla-get-PlotType actlay))&lt;BR /&gt;
       (cons "PlotOrigin" (vlax-safearray-&amp;gt;list(vlax-variant-value(vla-get-PlotOrigin actlay))))&lt;BR /&gt;
       (cons "PlotWithPlotStyles" (vla-get-PlotWithPlotStyles actlay))&lt;BR /&gt;
       (cons "ScaleLineweights" (vla-get-ScaleLineweights actlay))&lt;BR /&gt;
       (cons "UseStandardScale" (vla-get-UseStandardScale actlay))&lt;BR /&gt;
       (cons "StandardScale" (vla-get-StandardScale actlay))&lt;BR /&gt;
       (cons "Paper Height" height)(cons "Paper Width" Width)&lt;BR /&gt;
       (cons "Margin LowerLeft" (vlax-safearray-&amp;gt;list lowerleft))&lt;BR /&gt;
       (cons "Margin UpperRight" (vlax-safearray-&amp;gt;list upperright))&lt;BR /&gt;
       (cons "Plot Window Lower Left" (vlax-safearray-&amp;gt;list LLeft))&lt;BR /&gt;
       (cons "Plot Window Upper Right" (vlax-safearray-&amp;gt;list URight))&lt;BR /&gt;
       (cons "Custom Scale Numerator" numerator)&lt;BR /&gt;
       (cons "Custom Scale Denominator" denominator)&lt;BR /&gt;
       (cons "Custom Scale" (/ denominator numerator)))&lt;BR /&gt;
  )&lt;BR /&gt;
  pltConfigLst&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------c:Test----------------------&lt;BR /&gt;
;(GetLocaleMediaName "YourDevice.pc3") where "YourDevice.pc3" is a device witch is available from (GetPlotDevices)&lt;BR /&gt;
(defun c:Test ()&lt;BR /&gt;
  (vl-load-com)&lt;BR /&gt;
  (princ "\nDevices:\n")&lt;BR /&gt;
  (princ (GetPlotDevices))&lt;BR /&gt;
  (GetLocaleMediaName "None")&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Harrie</description>
    <pubDate>Thu, 15 Jun 2006 11:35:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-06-15T11:35:46Z</dc:date>
    <item>
      <title>Actual papersize?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675745#M150631</link>
      <description>I can get the current paper size name with this.&lt;BR /&gt;
(SETQ SIZE (VLA-GET-CANONICALMEDIANAME (VLA-GET-ACTIVELAYOUT (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))))&lt;BR /&gt;
&lt;BR /&gt;
How can I get the actual dimensions of that papersize and not just the name?</description>
      <pubDate>Wed, 14 Jun 2006 23:50:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675745#M150631</guid>
      <dc:creator>scowsert</dc:creator>
      <dc:date>2006-06-14T23:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Actual papersize?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675746#M150632</link>
      <description>(vla-GetPaperSize&lt;BR /&gt;
 (vla-Get-ActiveLayout&lt;BR /&gt;
  (vla-Get-ActiveDocument&lt;BR /&gt;
   (vlax-Get-Acad-Object))))&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
R. Robert Bell&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;WIZEGUY&gt; wrote in message news:5206796@discussion.autodesk.com...&lt;BR /&gt;
I can get the current paper size name with this.&lt;BR /&gt;
(SETQ SIZE (VLA-GET-CANONICALMEDIANAME (VLA-GET-ACTIVELAYOUT &lt;BR /&gt;
(VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))))&lt;BR /&gt;
&lt;BR /&gt;
How can I get the actual dimensions of that papersize and not just the name?&lt;/WIZEGUY&gt;</description>
      <pubDate>Wed, 14 Jun 2006 23:54:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675746#M150632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-14T23:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Actual papersize?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675747#M150633</link>
      <description>Ultimately I'd like to get all actual papersizes available from a plotter. I can get all the papersize names available. Is there a way I can extract the actual size based on the papername?</description>
      <pubDate>Thu, 15 Jun 2006 01:26:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675747#M150633</guid>
      <dc:creator>scowsert</dc:creator>
      <dc:date>2006-06-15T01:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Actual papersize?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675748#M150634</link>
      <description>I've never bothered. Perhaps someone that has will reply.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
R. Robert Bell&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;WIZEGUY&gt; wrote in message news:5206858@discussion.autodesk.com...&lt;BR /&gt;
Ultimately I'd like to get all actual papersizes available from a plotter. I &lt;BR /&gt;
can get all the papersize names available. Is there a way I can extract the &lt;BR /&gt;
actual size based on the papername?&lt;/WIZEGUY&gt;</description>
      <pubDate>Thu, 15 Jun 2006 02:51:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675748#M150634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-15T02:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Actual papersize?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675749#M150635</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Maybe this can help&lt;BR /&gt;
&lt;BR /&gt;
;-------------------------------------------------------------GetCanonicalMediaNames--------------&lt;BR /&gt;
(defun GetCanonicalMediaNames (/ ad)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object )))&lt;BR /&gt;
  (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))&lt;BR /&gt;
  (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-GetCanonicalMediaNames (vla-item (vla-get-layouts ad) "Model"))))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------GetLocaleMediaName------------------&lt;BR /&gt;
(defun GetLocaleMediaName (pd / ad la al)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object))&lt;BR /&gt;
        la (vla-item (vla-get-layouts ad) "Model")&lt;BR /&gt;
	al (vla-get-activelayout ad)&lt;BR /&gt;
  )&lt;BR /&gt;
  (vla-put-configname al pd)&lt;BR /&gt;
  (princ "\n\n\nSetting:\n")&lt;BR /&gt;
  (princ (showDeviceProp al))&lt;BR /&gt;
  (princ "\n\n\nMedia:\n")&lt;BR /&gt;
  (mapcar '(lambda(mn)(vla-GetLocaleMediaName la mn)) (GetCanonicalMediaNames))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------GetPlotDevices----------------------&lt;BR /&gt;
(defun GetPlotDevices (/ ad)&lt;BR /&gt;
  (setq ad (vla-get-activedocument (vlax-get-acad-object)))&lt;BR /&gt;
  (vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))&lt;BR /&gt;
  (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-getplotdevicenames (vla-item (vla-get-layouts ad) "Model"))))&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------showDeviceProps----------------------&lt;BR /&gt;
(defun showDeviceProp (actlay / cusscl Numerator Denominator papmrg LowerLeft UpperRight papsiz Width Height window LLeft URight pltConfigLst)&lt;BR /&gt;
  (setq cusscl (vla-GetCustomScale actlay 'Numerator 'Denominator)&lt;BR /&gt;
        papmrg (vla-GetPaperMargins actlay 'LowerLeft 'UpperRight)&lt;BR /&gt;
        papsiz (vla-GetPaperSize actlay 'Width 'Height)&lt;BR /&gt;
        window (vla-GetWindowToPlot actlay 'LLeft 'URight)&lt;BR /&gt;
  )&lt;BR /&gt;
  (setq  pltConfigLst  (list (cons "ConfigName" (vla-get-Configname actlay))&lt;BR /&gt;
       (cons "StyleSheet" (vla-get-StyleSheet actlay))&lt;BR /&gt;
       (cons "CanonicalMediaName" (vla-get-CanonicalMediaName actlay))&lt;BR /&gt;
       (cons "CenterPlot" (vla-get-CenterPlot actlay))&lt;BR /&gt;
       (cons "PaperUnits" (vla-get-PaperUnits actlay))&lt;BR /&gt;
       (cons "PlotHidden" (vla-get-PlotHidden actlay))&lt;BR /&gt;
       (cons "PlotRotation" (vla-get-PlotRotation actlay))&lt;BR /&gt;
       (cons "PlotType" (vla-get-PlotType actlay))&lt;BR /&gt;
       (cons "PlotOrigin" (vlax-safearray-&amp;gt;list(vlax-variant-value(vla-get-PlotOrigin actlay))))&lt;BR /&gt;
       (cons "PlotWithPlotStyles" (vla-get-PlotWithPlotStyles actlay))&lt;BR /&gt;
       (cons "ScaleLineweights" (vla-get-ScaleLineweights actlay))&lt;BR /&gt;
       (cons "UseStandardScale" (vla-get-UseStandardScale actlay))&lt;BR /&gt;
       (cons "StandardScale" (vla-get-StandardScale actlay))&lt;BR /&gt;
       (cons "Paper Height" height)(cons "Paper Width" Width)&lt;BR /&gt;
       (cons "Margin LowerLeft" (vlax-safearray-&amp;gt;list lowerleft))&lt;BR /&gt;
       (cons "Margin UpperRight" (vlax-safearray-&amp;gt;list upperright))&lt;BR /&gt;
       (cons "Plot Window Lower Left" (vlax-safearray-&amp;gt;list LLeft))&lt;BR /&gt;
       (cons "Plot Window Upper Right" (vlax-safearray-&amp;gt;list URight))&lt;BR /&gt;
       (cons "Custom Scale Numerator" numerator)&lt;BR /&gt;
       (cons "Custom Scale Denominator" denominator)&lt;BR /&gt;
       (cons "Custom Scale" (/ denominator numerator)))&lt;BR /&gt;
  )&lt;BR /&gt;
  pltConfigLst&lt;BR /&gt;
)&lt;BR /&gt;
;-------------------------------------------------------------c:Test----------------------&lt;BR /&gt;
;(GetLocaleMediaName "YourDevice.pc3") where "YourDevice.pc3" is a device witch is available from (GetPlotDevices)&lt;BR /&gt;
(defun c:Test ()&lt;BR /&gt;
  (vl-load-com)&lt;BR /&gt;
  (princ "\nDevices:\n")&lt;BR /&gt;
  (princ (GetPlotDevices))&lt;BR /&gt;
  (GetLocaleMediaName "None")&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Harrie</description>
      <pubDate>Thu, 15 Jun 2006 11:35:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/actual-papersize/m-p/1675749#M150635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-15T11:35:46Z</dc:date>
    </item>
  </channel>
</rss>

