CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

线型属性 (ActiveX)

2023-1-3 11:55| 发布者: admin| 查看: 373| 评论: 0|来自: AutoCAD

摘要: 获取文档的线型集合。

获取文档的线型集合。

支持的平台:仅窗口

签名

工 务 局:

object.Linetypes
对象

类型:数据库文档

此属性适用的对象。

属性值

只读:是的

类型:线型

文档的集合。Linetypes

言论

没有额外的评论。

例子

工 务 局:

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

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

GMT+8, 2024-5-12 09:59

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部