モデル空間の高度を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: 倍精度浮動小数点数型
モデル空間の高度の設定
現在の高度は、3D 点が必要なのに X と Y の値しか指定されていないときに使用される Z 値です。現在の高度は、モデル空間とペーパー空間で別々に維持されます。
VBA:
Sub Example_ElevationModelSpace()
' This example changes the model space elevation of the current drawing
' and then resets it to the original value again.
Dim currElevation As Double
currElevation = ThisDrawing.ElevationModelSpace
MsgBox "The current model space elevation is " & ThisDrawing.ElevationModelSpace, vbInformation, "ElevationModelSpace Example"
' Change the elevation
ThisDrawing.ElevationModelSpace = currElevation + 2
MsgBox "The new model space elevation is " & ThisDrawing.ElevationModelSpace, vbInformation, "ElevationModelSpace Example"
' Reset the elevation to its original value
ThisDrawing.ElevationModelSpace = currElevation
MsgBox "The model space elevation is reset to " & ThisDrawing.ElevationModelSpace, vbInformation, "ElevationModelSpace Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_ElevationModelSpace()
;; This example changes the model space elevation of the current drawing
;; and then resets it to the original value again.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq currElevation (vla-get-ElevationModelSpace doc))
(alert (strcat "The current model space elevation is " (rtos currElevation 2)))
;; Change the elevation
(vla-put-ElevationModelSpace doc (+ currElevation 2))
(alert (strcat "The new model space elevation is " (rtos (vla-get-ElevationModelSpace doc) 2)))
;; Reset the elevation to its original value
(vla-put-ElevationModelSpace doc currElevation)
(alert (strcat "The model space elevation is reset to " (rtos (vla-get-ElevationModelSpace doc) 2)))
)