レイアウトまたは印刷環境設定のプロパティの表示単位を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: acPlotPaperUnits 列挙型
このプロパティは、ユーザ インタフェースでのレイアウトまたは印刷設定の表示のための単位を決定します。ActiveX オートメーション プロパティの入力や値の取得のための単位は決定しません。すべての ActiveX オートメーション プロパティは、単位設定にかかわらずミリメートルまたはラジアンで表されます。
このプロパティに対する変更は図面が再作図されないと分かりません。Regen メソッドを使用して図面を再作図してください。
VBA:
Sub Example_PaperUnits()
' This example will access the Layouts collection for the current drawing
' and list basic information about the paper units used for each Layout.
Dim Layouts As AcadLayouts, Layout As ACADLayout
Dim msg As String
Dim Measurement As String
' Get layouts collection from document object
Set Layouts = ThisDrawing.Layouts
msg = vbCrLf ' Start with a space
' Get the paper units information of every layout in this drawing
For Each Layout In Layouts
' Using inches or millimeters?
Measurement = IIf(Layout.PaperUnits = acInches, " inches", " millimeters")
' Format for display
msg = msg & Layout.name & " is using" & Measurement & vbCrLf
Next
' Display paper units information
MsgBox "The paper units used in the current drawing are: " & msg
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_PaperUnits()
;; This example will access the Layouts collection for the current drawing
;; and list basic information about the paper units used for each Layout.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Get layouts collection from document object
(setq Layouts (vla-get-Layouts doc))
(setq msg ""
Measurement "")
;; Get the paper units information of every layout in this drawing
(vlax-for Layout Layouts
;; Using inches or millimeters?
(setq Measurement (if (= (vla-get-PaperUnits Layout) acInches) " inches" " millimeters"))
;; Format for display
(setq msg (strcat msg (vla-get-Name Layout) " is using" Measurement "\n"))
)
;; Display paper units information
(alert (strcat "The paper units used in the current drawing are: \n" msg))
)