PickAuto Property (ActiveX)

Controls automatic windowing at the Select Objects prompt.

Supported platforms: Windows only

Signature

VBA:

object.PickAuto
object

Type: PreferencesSelection

The object this property applies to.

Property Value

Read-only: No

Type: Boolean

Remarks

The initial value of this property is True.

Note: The value for this property is stored in the PICKAUTO system variable.

Examples

VBA:

Sub Example_PickAuto()
    ' This example reads and modifies the preference value that controls
    ' automatic windowing at the Select Objects prompt.
    ' When finished, this example resets the preference value back to
    ' its original value.
    
    Dim ACADPref As AcadPreferencesSelection
    Dim originalValue As Variant, newValue As Variant
    
    ' Get the selection preferences object
    Set ACADPref = ThisDrawing.Application.Preferences.Selection
    
    ' Read and display the original value
    originalValue = ACADPref.PickAuto
    MsgBox "The PickAuto preference is set to: " & originalValue

    ' Modify the PickAuto preference by toggling the value
    ACADPref.PickAuto = Not (ACADPref.PickAuto)
    newValue = ACADPref.PickAuto
    MsgBox "The PickAuto preference has been set to: " & newValue

    ' Reset the preference back to its original value
    '
    ' * Note: Comment out this last section to leave the change to
    '         this preference in effect
    ACADPref.PickAuto = originalValue
    MsgBox "The PickAuto preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PickAuto()
    ;; This example reads and modifies the preference value that controls
    ;; automatic windowing at the Select Objects prompt.
    ;; When finished, this example resets the preference value back to
    ;; its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-PickAuto (vla-get-Selection preferences)))
    (alert (strcat "The PickAuto preference is set to: " (if (= originalValue :vlax-true) "True" "False")))

    ;; Modify the PickAuto preference by toggling the value
    (vla-put-PickAuto (vla-get-Selection preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true))
    (setq newValue (vla-get-PickAuto (vla-get-Selection preferences)))
    (alert (strcat "The PickAuto preference has been set to: " (if (= newValue :vlax-true) "True" "False")))

    ;; Reset the preference back to its original value
    ;;
    ;; * Note: Comment out this last section to leave the change to
    ;;         this preference in effect
    (vla-put-PickAuto (vla-get-Selection preferences) originalValue)
    (alert (strcat "The PickAuto preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)