UseLastPlotSettings 属性 (ActiveX)
应用上次成功打印的打印设置。 支持的平台:仅限 Windows 属性值只读:不 类型:布尔
言论没有其他评论。 例子VBA: Sub Example_UseLastPlotSettings() ' This example reads and modifies the UseLastPlotSettings ' preference value. ' When finished, this example resets the preference value back to ' it's 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.UseLastPlotSettings MsgBox "The UseLastPlotSettings preference is set to: " & originalValue ' Modify the UseLastPlotSettings preference by toggling the value ACADPref.UseLastPlotSettings = Not ACADPref.UseLastPlotSettings MsgBox "The UseLastPlotSettings preference has been set to: " & ACADPref.UseLastPlotSettings ' Reset the preference back to it's original value ACADPref.UseLastPlotSettings = originalValue MsgBox "The UseLastPlotSettings preference was reset back to: " & originalValue End Sub 可视化 LISP: (vl-load-com) (defun c:Example_UseLastPlotSettings() ;; This example reads and modifies the UseLastPlotSettings ;; preference value. ;; When finished, this example resets the preference value back to ;; it's original value. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-UseLastPlotSettings (vla-get-Output preferences))) (alert (strcat "The UseLastPlotSettings preference is set to: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the UseLastPlotSettings preference by toggling the value (vla-put-UseLastPlotSettings (vla-get-Output preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The UseLastPlotSettings preference has been set to: " (if (= (vla-get-UseLastPlotSettings (vla-get-Output preferences)) :vlax-true) "True" "False"))) ;; Reset the preference back to it's original value (vla-put-UseLastPlotSettings (vla-get-Output preferences) originalValue) (alert (strcat "The UseLastPlotSettings preference was reset back to: " (if (= (vla-get-UseLastPlotSettings (vla-get-Output preferences)) :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 11:55
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.