CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2020 开发者帮助

Linetypes 属性 (ActiveX)

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

Linetypes 属性 (ActiveX)

获取文档的 Linetypes 集合。

支持的平台:仅限 Windows

签名

VBA:

object.Linetypes
对象

类型:数据库文档

此属性应用于的对象。

属性值

只读:是的

类型:线型

文档的集合。Linetypes

言论

没有其他评论。

例子

VBA:

Sub Example_Linetypes()
    ' This example finds the linetypes collection and
    ' lists all the available linetypes in the collection.
    
    Dim linetypeColl As AcadLineTypes
    Dim entry As AcadLineType
    Dim msg As String
    
    ' Return the linetype collection object of the active document
    Set linetypeColl = ThisDrawing.Linetypes

    ' List all available linetypes
    For Each entry In linetypeColl
        msg = msg & entry.name & vbCrLf
    Next
    MsgBox "The linetypes available in this drawing are:" & vbCrLf & msg, vbInformation, "Linetypes Example"
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_Linetypes()
    ;; This example finds the linetypes collection and
    ;; lists all the available linetypes in the collection.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Return the linetype collection object of the active document
    (setq linetypeColl (vla-get-Linetypes doc))
  
    ;; List all available linetypes
    (setq msg "")
    (vlax-for entry linetypeColl
        (setq msg (strcat msg (vla-get-Name entry) "\n"))
    )

    (alert (strcat "The linetypes available in this drawing are:\n" msg))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-12-15 12:54

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部