MaxAutoCADWindow Property (ActiveX)

Specifies whether the AutoCAD window should fill the entire screen area when you start.

Supported platforms: Windows only

Signature

VBA:

object.MaxAutoCADWindow
object

Type: PreferencesDisplay

The object this property applies to.

Property Value

Read-only: No

Type: Boolean

Remarks

No additional remarks.

Examples

VBA:

Sub Example_MaxAutoCADWindow()
    ' This example returns the current setting of
    ' MaxAutoCADWindow. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currMaxAutoCADWindow As Boolean
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current MaxAutoCADWindow value
    currMaxAutoCADWindow = preferences.DISPLAY.MaxAutoCADWindow
    MsgBox "The current value for MaxAutoCADWindow is " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example"
    
    ' Change the value for MaxAutoCADWindow
    preferences.DISPLAY.MaxAutoCADWindow = Not (currMaxAutoCADWindow)
    MsgBox "The new value for MaxAutoCADWindow is " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example"
    
    ' Reset MaxAutoCADWindow to its original value
    preferences.DISPLAY.MaxAutoCADWindow = currMaxAutoCADWindow
    MsgBox "The MaxAutoCADWindow value is reset to " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_MaxAutoCADWindow()
    ;; This example returns the current setting of
    ;; MaxAutoCADWindow. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Retrieve the current MaxAutoCADWindow value
    (setq currMaxAutoCADWindow (vla-get-MaxAutoCADWindow (vla-get-Display preferences)))
    (alert (strcat "The current value for MaxAutoCADWindow is " (if (= currMaxAutoCADWindow :vlax-true) "True"  "False")))
    
    ;; Change the value for MaxAutoCADWindow
    (vla-put-MaxAutoCADWindow (vla-get-Display preferences) (if (= currMaxAutoCADWindow :vlax-true) :vlax-false :vlax-true))
    (alert (strcat "The new value for MaxAutoCADWindow is " (if (= (vla-get-MaxAutoCADWindow (vla-get-Display preferences)) :vlax-true) "True" "False")))
    
    ;; Reset MaxAutoCADWindow to its original value
    (vla-put-MaxAutoCADWindow (vla-get-Display preferences) currMaxAutoCADWindow)
    (alert (strcat "The MaxAutoCADWindow value is reset to " (if (= (vla-get-MaxAutoCADWindow (vla-get-Display preferences)) :vlax-true) "True" "False")))
)