明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 938|回复: 1

XLAX类模块在哪里下载?

[复制链接]
发表于 2008-7-24 13:14:00 | 显示全部楼层 |阅读模式

http://www.mjtd.com/e-zine/list04.htm

有这么如下描述,问XLAX类模块在哪里下载?

要使用以下代码,你必须将XLAX类模块输入到你的工程中。如果你还没有,可以在本站下载。

Public Sub AddXdataToVertices()

 Dim obj As VLAX, ent As AcadObject

 Dim vertex As AcadObject, xType(0 To 1) As Integer, xData(0 To 1)

 

 ThisDrawing.Utility.GetEntity ent, pt, "Select polyline"

 If TypeOf ent Is AcadPolyline Then

 

  Set obj = New VLAX

  obj.EvalLispExpression "(defun getvertices (poly / tmp lst) " & _

              "(setq tmp (entget (entnext poly))) (while " & _

              "(= (cdr (assoc 0 tmp)) ""VERTEX"") (setq lst " & _

              "(cons (cdr (assoc 5 tmp)) lst) tmp (entget " & _

              "(entnext (cdr (assoc -1 tmp)))))) (reverse lst))"

  obj.EvalLispExpression _

              "(setq vertexlist (getvertices (handent """ &_

               ent.Handle & """)))"

  retVal = obj.GetLispList("vertexlist")

  obj.NullifySymbol "getvertices", "vertexlist"

 

  xType(0) = 1001: xData(0) = "MY_APP"

 

  For i = LBound(retVal) To UBound(retVal)

   xType(1) = 1000: xData(1) = retVal(i)

   Set vertex = ThisDrawing.HandleToObject(retVal(i))

   vertex.SetXData xType, xData

  Next

 

 End If

End Sub

发表于 2008-7-24 18:19:00 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 06:27 , Processed in 0.170449 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表