CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

PlotWithLineweights Property (ActiveX)

2023-1-3 08:25| 发布者: admin| 查看: 388| 评论: 0|来自: AutoCAD

摘要: 指定对象是使用打印文件中为其指定的线宽进行打印,还是使用图形文件中的线宽进行打印。

指定对象是使用打印文件中为其指定的线宽进行打印,还是使用图形文件中的线宽进行打印。

支持的平台:仅窗口

签名

工 务 局:

object.PlotWithLineweights
对象

类型:布局绘图配置

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:使用打印样式中的线宽进行打印。
  • False:使用图形文件中的线宽进行打印。

言论

没有额外的评论。

例子

工 务 局:

Sub Example_PlotWithLineweights()
    ' This example reads and modifies the PlotWithLineweights
    ' Layout value.
    ' When finished, this example resets the  value back to
    ' its original value.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Boolean
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.PlotWithLineweights
    MsgBox "The PlotWithLineweights value is set to: " & originalValue

    ' Modify the PlotWithLineweights preference by toggling the value
    ACADLayout.PlotWithLineweights = Not ACADLayout.PlotWithLineweights
    MsgBox "The PlotWithLineweights preference has been set to: " & ACADLayout.PlotWithLineweights

    ' Reset the preference back to its original value
    ACADLayout.PlotWithLineweights = originalValue
    MsgBox "The PlotWithLineweights preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PlotWithLineweights()
    ;; This example reads and modifies the PlotWithLineweights
    ;; Layout value.
    ;; When finished, this example resets the  value back to
    ;; its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Get the layout object
    (setq ACADLayout (vla-get-ActiveLayout doc))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-PlotWithLineweights ACADLayout))
    (alert (strcat "The PlotWithLineweights value is set to: " (if (= originalValue :vlax-true) "True" "False")))

    ;; Modify the PlotWithLineweights preference by toggling the value
    (vla-put-PlotWithLineweights ACADLayout (if (= originalValue :vlax-true) :vlax-false :vlax-true))
    (setq newValue (vla-get-PlotWithLineweights ACADLayout))
    (alert (strcat "The PlotWithLineweights preference has been set to: " (if (= newValue :vlax-true) "True" "False")))

    ;; Reset the preference back to its original value
    (vla-put-PlotWithLineweights ACADLayout originalValue)
    (alert (strcat "The PlotWithLineweights preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 04:43

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部