Selection Property (ActiveX)

Gets the PreferencesSelection object.

Supported platforms: Windows only

Signature

VBA:

object.Selection
object

Type: Preferences

The object this property applies to.

Property Value

Read-only: Yes

Type: PreferencesSelection

Gets the PreferencesSelection object.

Remarks

The PreferencesSelection object holds all the options from the Selection tab on the Options dialog stored in the registry. All options that are stored with the drawing can be found on the DatabasePreferences object.

Examples

VBA:

Sub Example_Selection()
    ' This example obtains a reference to the Selection Preferences object
    ' from the Application Preferences object, and reads one of the Selection
    ' preferences
    
    Dim ACADPref As AcadPreferencesSelection
    
    ' Obtain a reference to the Selection Preferences object
    Set ACADPref = ThisDrawing.Application.Preferences.Selection
    
    MsgBox "We now have access to the properties and methods of the Selection Preferences object!"
    MsgBox "The Selection preference GripSize is set to: " & ACADPref.GripSize

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Selection()
    ;; This example obtains a reference to the Selection Preferences object
    ;; from the Application Preferences object, and reads one of the Selection
    ;; preferences
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))

    (alert "We now have access to the properties and methods of the Selection Preferences object!")
    (alert (strcat "The Selection preference GripSize is set to: " (itoa (vla-get-GripSize (vla-get-Selection preferences)))))
)