ElevationPaperSpace 属性 (ActiveX) 
指定图纸空间中的高程设置。 支持的平台:仅限 Windows 属性值只读:不 类型:双 图纸空间的高程。 言论当前高程是每当需要 3D 点但仅提供 X 和 Y 值时使用的 Z 值。当前高程分别在模型空间和图纸空间中维护。 例子VBA: Sub Example_ElevationPaperSpace()
    ' This example changes the paper space elevation of the current drawing
    ' and then resets it to the original value.
    
    Dim currElevation As Double
    
    currElevation = ThisDrawing.ElevationPaperSpace
    MsgBox "The current paper space elevation is " & ThisDrawing.ElevationPaperSpace, vbInformation, "ElevationpaperSpace Example"
    
    ' Change the elevation
    ThisDrawing.ElevationPaperSpace = currElevation + 2
    MsgBox "The new paper space elevation is " & ThisDrawing.ElevationPaperSpace, vbInformation, "ElevationpaperSpace Example"
    
    ' Reset the elevation to its original value
    ThisDrawing.ElevationPaperSpace = currElevation
    MsgBox "The paper space elevation is reset to " & ThisDrawing.ElevationPaperSpace, vbInformation, "ElevationPaperSpace Example"
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_ElevationPaperSpace()
    ;; This example changes the paper space elevation of the current drawing
    ;; and then resets it to the original value.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq currElevation (vla-get-ElevationPaperSpace doc))
    (alert (strcat "The current paper space elevation is " (rtos currElevation 2)))
    
    ;; Change the elevation
    (vla-put-ElevationPaperSpace doc (+ currElevation 2))
    (alert (strcat "The new paper space elevation is " (rtos (vla-get-ElevationPaperSpace doc) 2)))
    
    ;; Reset the elevation to its original value
    (vla-put-ElevationPaperSpace doc currElevation)
    (alert (strcat "The paper space elevation is reset to " (rtos (vla-get-ElevationPaperSpace doc) 2)))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:35
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.