CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

说明属性 (ActiveX)

2023-1-3 19:02| 发布者: admin| 查看: 476| 评论: 0|来自: AutoCAD

摘要: 指定对象的描述。

指定对象的描述。

支持的平台:仅窗口

签名

工 务 局:

object.Description
对象

类型:动态块引用属性图层线型材质MLeader样式,表格样式

此属性适用的对象。

属性值

只读:不;对象除外DynamicBlockReferenceProperty

类型:字符串

分配给对象的描述。

言论

动态块参照属性的描述由块作者设置,无法编辑。

线型描述最多可包含 47 个字符。描述可以是注释或一系列下划线、点、短划线和空格,以显示线型图案的简单表示。

例子

工 务 局:

Sub Example_Description()
    ' This example returns the description of the active linetype.
    ' It then changes the description of the active linetype.
    
    Dim currDescription As String
    
    ' This example modifies the description of a linetype
    currDescription = ThisDrawing.ActiveLinetype.Description
    MsgBox "The description of the active LineType is: " & currDescription, vbInformation, "Description Example"

    ' Change the description of the active linetype
    ThisDrawing.ActiveLinetype.Description = "My favorite LineType"
    MsgBox "The new description of the active LineType is: " & ThisDrawing.ActiveLinetype.Description, vbInformation, "Description Example"
    
    ' Reset the description of the active linetype
    ThisDrawing.ActiveLinetype.Description = currDescription
    MsgBox "The description of the active LineType is reset to: " & ThisDrawing.ActiveLinetype.Description, vbInformation, "Description Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Description()
    ;; This example returns the description of the active linetype.
    ;; It then changes the description of the active linetype.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; This example modifies the description of a linetype
    (setq currDescription (vla-get-Description (vla-get-ActiveLinetype doc)))
    (alert (strcat "The description of the active Linetype is: " currDescription))

    ;; Change the description of the active linetype
    (vla-put-Description (vla-get-ActiveLinetype doc) "My favorite LineType")
    (alert (strcat "The new description of the active Linetype is: " (vla-get-Description (vla-get-ActiveLinetype doc))))
    
    ;; Reset the description of the active linetype
    (vla-put-Description (vla-get-ActiveLinetype doc) currDescription)
    (alert (strcat "The description of the active Linetype is reset to: " currDescription))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 19:51

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部