CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2023 开发者帮助

ModelType 属性 (ActiveX)

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

ModelType 属性 (ActiveX)

指定打印配置是应用于模型空间还是所有布局。

支持的平台:仅限 Windows

签名

VBA:

object.ModelType
对象

类型:布局PlotConfiguration

此属性应用于的对象。

属性值

只读:是的

类型:布尔

  • True:打印配置仅适用于“模型空间”选项卡,或者布局为模型空间布局。
  • False:打印配置适用于所有布局,或者布局为纸张空间布局。

言论

没有其他评论。

例子

VBA:

Sub Example_ModelType()
    ' This example creates a plot configuration object
    ' and then finds the ModelType for the object.
    
    Dim PlotConfigObj As AcadPlotConfiguration

    ' Creates the MText Object
    Set PlotConfigObj = ThisDrawing.PlotConfigurations.Add("NewPlotConfiguration")
    
    ' Find the current ModelType
    Dim currModelType As Boolean
    currModelType = PlotConfigObj.ModelType
    MsgBox "The ModelType for the object is: " & currModelType
    
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_ModelType()
    ;; This example creates a plot configuration object
    ;; and then finds the ModelType for the object.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))    

    ;; Creates the MText Object
    (setq PlotConfigObj (vla-Add (vla-get-PlotConfigurations doc) "NewPlotConfiguration"))
    
    ;; Find the current ModelType
    (setq currModelType (vla-get-ModelType PlotConfigObj))
    (alert (strcat "The ModelType for the object is: " (if (= currModelType :vlax-true) "True" "False")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2025-3-14 08:39

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部