用紙サイズを名前で指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: 文字列
用紙サイズの名前
このプロパティに対する変更は図面が再作図されないと分かりません。Regen メソッドを使用して図面を再作図してください。
VBA:
Sub Example_CanonicalMediaName()
' This example finds the name of the media for the active layout
Dim MediaName As String
MediaName = ThisDrawing.ActiveLayout.CanonicalMediaName
If MediaName = "" Then
MsgBox "There is no media set for the active layout."
Else
MsgBox "The media for the active layout is: " & MediaName
End If
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_CanonicalMediaName()
;; This example finds the name of the media for the active layout
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq MediaName (vla-get-CanonicalMediaName (vla-get-ActiveLayout doc)))
(if (/= MediaName "")
(alert "There is no media set for the active layout.")
(alert (strcat "The media for the active layout is: " MediaName))
)
)