CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2018 开发者帮助

UseLastPlotSettings 属性 (ActiveX)

2024-5-18 16:55| 发布者: admin| 查看: 68| 评论: 0|原作者: admin|来自: AutoCAD

UseLastPlotSettings 属性 (ActiveX)

应用上次成功打印的打印设置。

支持的平台:仅限 Windows

签名

VBA:

object.UseLastPlotSettings
对象

类型:首选项输出

此属性应用于的对象。

属性值

只读:

类型:布尔

  • True:使用上次成功绘图的设置作为当前绘图设置。
  • False:不要将上次成功打印的设置用作当前打印设置。

言论

没有其他评论。

例子

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")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2024-12-15 11:55

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部