設定された用紙の幅と高さを取得します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.GetPaperSize Width, Height
タイプ: Layout、PlotConfiguration
このメソッドが適用されるオブジェクト。
アクセス: 出力のみ
タイプ: 倍精度浮動小数点数型
用紙の幅。
アクセス: 出力のみ
タイプ: 倍精度浮動小数点数型
用紙の高さ。
戻り値はありません。
幅と高さの値の単位は PaperUnits プロパティにより指定されます。
用紙サイズを設定するには、CanonicalMediaName プロパティを使用します。
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)))
)