Drafting Property (ActiveX)

Gets the PreferencesDrafting object.

Supported platforms: Windows only

Signature

VBA:

object.Drafting
object

Type: Preferences

The object this property applies to.

Property Value

Read-only: Yes

Type: PreferencesDrafting

Gets the PreferencesDrafting object.

Remarks

The PreferencesDrafting object holds all the options from the Drafting 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_Drafting()
    ' This example obtains a reference to the Drafting Preferences object
    ' from the Application Preferences object, and reads one of the Drafting
    ' preferences
    
    Dim ACADPref As AcadPreferencesDrafting
    
    ' Obtain a reference to the Drafting Preferences object
    Set ACADPref = ThisDrawing.Application.Preferences.Drafting
    
    MsgBox "We now have access to the properties and methods of the Drafting Preferences object!"
    MsgBox "The Drafting preference AutoSnapTooltip is set to: " & ACADPref.AutoSnapTooltip

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Drafting()
    ;; This example obtains a reference to the Drafting Preferences object
    ;; from the Application Preferences object, and reads one of the Drafting
    ;; preferences
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Obtain a reference to the Drafting Preferences object
    (setq ACADPref (vla-get-Drafting preferences))
    
    (alert "We now have access to the properties and methods of the Drafting Preferences object!")
    (alert (strcat "The Drafting preference AutoSnapTooltip is set to: " (if (= (vla-get-AutoSnapTooltip ACADPref) :vlax-true) "True" "false")))
)