PreferencesDrafting オブジェクトを取得します。
サポートされているプラットフォーム: Windows のみ
PreferencesDrafting オブジェクトは、レジストリに保存されている[オプション]ダイアログ ボックスの[作図補助]タブのすべてのオプションを保持しています。図面とともに保存されたすべてのオプションは、DatabasePreferences オブジェクトで検索できます。
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")))
)