指定 AutoCAD 窗口在启动时是否应填充整个屏幕区域。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论没有额外的评论。 例子工 务 局: Sub Example_MaxAutoCADWindow() ' This example returns the current setting of ' MaxAutoCADWindow. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currMaxAutoCADWindow As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current MaxAutoCADWindow value currMaxAutoCADWindow = preferences.DISPLAY.MaxAutoCADWindow MsgBox "The current value for MaxAutoCADWindow is " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example" ' Change the value for MaxAutoCADWindow preferences.DISPLAY.MaxAutoCADWindow = Not (currMaxAutoCADWindow) MsgBox "The new value for MaxAutoCADWindow is " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example" ' Reset MaxAutoCADWindow to its original value preferences.DISPLAY.MaxAutoCADWindow = currMaxAutoCADWindow MsgBox "The MaxAutoCADWindow value is reset to " & preferences.DISPLAY.MaxAutoCADWindow, vbInformation, "MaxAutoCADWindow Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_MaxAutoCADWindow() ;; This example returns the current setting of ;; MaxAutoCADWindow. 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)) ;; Retrieve the current MaxAutoCADWindow value (setq currMaxAutoCADWindow (vla-get-MaxAutoCADWindow (vla-get-Display preferences))) (alert (strcat "The current value for MaxAutoCADWindow is " (if (= currMaxAutoCADWindow :vlax-true) "True" "False"))) ;; Change the value for MaxAutoCADWindow (vla-put-MaxAutoCADWindow (vla-get-Display preferences) (if (= currMaxAutoCADWindow :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The new value for MaxAutoCADWindow is " (if (= (vla-get-MaxAutoCADWindow (vla-get-Display preferences)) :vlax-true) "True" "False"))) ;; Reset MaxAutoCADWindow to its original value (vla-put-MaxAutoCADWindow (vla-get-Display preferences) currMaxAutoCADWindow) (alert (strcat "The MaxAutoCADWindow value is reset to " (if (= (vla-get-MaxAutoCADWindow (vla-get-Display preferences)) :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:15
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.