ElevationPaperSpace Property (ActiveX)

Specifies the elevation setting in paper space.

Supported platforms: Windows only

Signature

VBA:

object.ElevationPaperSpace
object

Type: Database, Document

The objects this property applies to.

Property Value

Read-only: No

Type: Double

The elevation for paper space.

Remarks

The current elevation is the Z value that is used whenever a 3D point is expected but only the X and Y values are supplied. The current elevation is maintained separately in model space and paper space.

Examples

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

Visual 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)))
)