User 属性 (ActiveX)
获取 PreferencesUser 对象。 支持的平台:仅限 Windows 签名VBA: object.User
言论该对象保存存储在注册表中的“选项”对话框的“用户”选项卡中的所有选项。与图形一起存储的所有选项都可以在对象上找到。PreferencesUserDatabasePreferences 例子VBA: Sub Example_User()
' This example obtains a reference to the User Preferences object
' from the Application Preferences object, and reads one of the User
' preferences
Dim ACADPref As AcadPreferencesUser
' Obtain a reference to the User Preferences object
Set ACADPref = ThisDrawing.Application.preferences.User
MsgBox "You now have access to the properties and methods of the User Preferences object!"
MsgBox "The User preference KeyboardAccelerator is set to: " & ACADPref.KeyboardAccelerator
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_User()
;; This example obtains a reference to the User Preferences object
;; from the Application Preferences object, and reads one of the User
;; preferences
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
(alert "You now have access to the properties and methods of the User Preferences object!")
(alert (strcat "The User preference KeyboardAccelerator is set to: " (if (= (vla-get-KeyboardAccelerator (vla-get-User preferences)) :vlax-true) "True" "False")))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-11-1 12:20
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.