PlotLegacy 属性 (ActiveX)
切换是否允许运行旧版绘图脚本。 支持的平台:仅限 Windows 属性值只读:不 类型:布尔
言论此属性的初始值为 。False 例子VBA: Sub Example_PlotLegacy()
' This example reads and modifies the PlotLegacy
' preference value.
' When finished, this example resets the preference value back to
' its original value.
Dim ACADPref As AcadPreferencesOutput
Dim originalValue As Boolean
' Get the user preferences object
Set ACADPref = ThisDrawing.Application.Preferences.Output
' Read and display the original value
originalValue = ACADPref.PlotLegacy
MsgBox "The PlotLegacy preference is set to: " & originalValue
' Modify the PlotLegacy preference by toggling the value
ACADPref.PlotLegacy = Not ACADPref.PlotLegacy
MsgBox "The PlotLegacy preference has been set to: " & ACADPref.PlotLegacy
' Reset the preference back to its original value
ACADPref.PlotLegacy = originalValue
MsgBox "The PlotLegacy preference was reset back to: " & originalValue
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_PlotLegacy()
;; This example reads and modifies the PlotLegacy
;; preference value.
;; When finished, this example resets the preference value back to
;; its original value.
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; Read and display the original value
(setq originalValue (vla-get-PlotLegacy (vla-get-Output preferences)))
(alert (strcat "The PlotLegacy preference is set to: " (if (= originalValue :vlax-true) "True" "False")))
;; Modify the PlotLegacy preference by toggling the value
(vla-put-PlotLegacy (vla-get-Output preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true))
(setq newValue (vla-get-PlotLegacy (vla-get-Output preferences)))
(alert (strcat "The PlotLegacy preference has been set to: " (if (= newValue :vlax-true) "True" "False")))
;; Reset the preference back to its original value
(vla-put-PlotLegacy (vla-get-Output preferences) originalValue)
(alert (strcat "The PlotLegacy preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 09:48
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.