Gets the width and height of the configured paper.
Supported platforms: Windows only
VBA:
object.GetPaperSize Width, Height
Type: Layout, PlotConfiguration
The objects this method applies to.
Access: Output-only
Type: Double
The width of the paper.
Access: Output-only
Type: Double
The height of the paper.
No return value.
The units for the width and height values are specified by the PaperUnits property.
To set the paper size, use the CanonicalMediaName property.
VBA:
Sub Example_GetPaperSize() ' This example gets the width and height of the default ' paper size for your system. Dim PaperWidth As Double Dim PaperHeight As Double ThisDrawing.ActiveLayout.GetPaperSize PaperWidth, PaperHeight MsgBox "The default paper size is " & vbCrLf & _ "Width: " & PaperWidth & vbCrLf & _ "Height: " & PaperHeight End Sub
Visual LISP:
(vl-load-com) (defun c:Example_GetPaperSize() ;; This example gets the width and height of the default ;; paper size for your system. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (vla-GetPaperSize (vla-get-ActiveLayout doc) 'PaperWidth 'PaperHeight) (alert (strcat "The default paper size is " "\nWidth: " (rtos PaperWidth 2) "\nHeight: " (rtos PaperHeight 2))) )