ActiveSpace Property (ActiveX)

Toggles the active space between paper space and model space.

Supported platforms: Windows only

Signature

VBA:

object.ActiveSpace
object

Type: Document

The object this property applies to.

Property Value

Read-only: No

Type: acActiveSpace enum

Remarks

For model space floating viewports, this value is set to acPaperSpace. Even though you have the capability of editing the model, you are still technically in paper space.

For more information on this property, see the PViewport object.

Note: The value of this property is stored in the TILEMODE system variable.

Examples

VBA:

Sub Example_ActiveSpace()
    ' This example toggles the ActiveSpace property from
    ' paper space to model space.
    ' Display the current setting for TILEMODE
    MsgBox "TILEMODE = " & ThisDrawing.ActiveSpace, vbInformation, "ActiveSpace Example"
     
    ' Changes active document to paper space
    ThisDrawing.ActiveSpace = acPaperSpace
    MsgBox "TILEMODE = " & ThisDrawing.ActiveSpace, vbInformation, "ActiveSpace Example"
   
    ' Changes active document to model space
    ThisDrawing.ActiveSpace = acModelSpace
    MsgBox "TILEMODE = " & ThisDrawing.ActiveSpace, vbInformation, "ActiveSpace Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ActiveSpace()
    ;; This example toggles the ActiveSpace property from
    ;; paper space to model space.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    ;; Display the current setting for TILEMODE
    (alert (strcat "TILEMODE = " (itoa (vla-get-ActiveSpace doc))))
     
    ;; Changes active document to paper space
    (vla-put-ActiveSpace doc acPaperSpace)
    (alert (strcat "TILEMODE = " (itoa (vla-get-ActiveSpace doc))))
   
    ;; Changes active document to model space
    (vla-put-ActiveSpace doc acModelSpace)
    (alert (strcat "TILEMODE = " (itoa (vla-get-ActiveSpace doc))))
)