DisplayScreenMenu 属性 (ActiveX)
指定是否在绘图窗口的右侧显示屏幕菜单。(已过时) 支持的平台:仅限 Windows 属性值只读:不 类型:布尔
言论此属性的初始值为 。False 例子VBA: Sub Example_DisplayScreenMenu() ' This example returns the current setting of ' DisplayScreenMenu. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currDisplayScreenMenu As Boolean Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current DisplayScreenMenu value currDisplayScreenMenu = preferences.Display.DisplayScreenMenu MsgBox "The current value for DisplayScreenMenu is " & preferences.DISPLAY.DisplayScreenMenu, vbInformation, "DisplayScreenMenu Example" ' Change the value for DisplayScreenMenu preferences.DISPLAY.DisplayScreenMenu = Not (currDisplayScreenMenu) MsgBox "The new value for DisplayScreenMenu is " & preferences.DISPLAY.DisplayScreenMenu, vbInformation, "DisplayScreenMenu Example" ' Reset DisplayScreenMenu to its original value preferences.DISPLAY.DisplayScreenMenu = currDisplayScreenMenu MsgBox "The DisplayScreenMenu value is reset to " & preferences.DISPLAY.DisplayScreenMenu, vbInformation, "DisplayScreenMenu Example" End Sub 可视化 LISP: (vl-load-com) (defun c:Example_DisplayScreenMenu() ;; This example returns the current setting of ;; DisplayScreenMenu. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Get the Display preferences object (setq ACADPref (vla-get-Display preferences)) ;; Retrieve the current DisplayScreenMenu value (setq currDisplayScreenMenu (vla-get-DisplayScreenMenu ACADPref)) (alert (strcat "The current value for DisplayScreenMenu is " (if (= currDisplayScreenMenu :vlax-true) "True" "False"))) ;; Change the value for DisplayScreenMenu (setq newValue (if (= currDisplayScreenMenu :vlax-true) :vlax-false :vlax-true)) (vla-put-DisplayScreenMenu ACADPref newValue) (alert (strcat "The new value for DisplayScreenMenu is " (if (= newValue :vlax-true) "True" "False"))) ;; Reset DisplayScreenMenu to its original value (vla-put-DisplayScreenMenu ACADPref currDisplayScreenMenu) (alert (strcat "The DisplayScreenMenu value is reset to " (if (= currDisplayScreenMenu :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 12:48
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.