明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1129|回复: 0

[求助]哪位高手帮我逐行解析一下啊!谢了!

[复制链接]
发表于 2004-10-12 15:07:00 | 显示全部楼层 |阅读模式
Dim ent As AcadEntity
Dim pnt As Variant
Dim NewCoord() As Double
Dim i As Integer
On Error Resume Next
Do
ThisDrawing.Utility.GetEntity ent, pnt, "选择多线段:"
If Err Then Exit Sub
If TypeName(ent) Like "IAcad*Polyline" Then Exit Do
Loop
Dim Coord As Variant
Dim CoordCount As Integer
If TypeName(ent) = "IAcadLWPolyline" Then
Coord = ent.Coordinates
CoordCount = (UBound(Coord) + 1) / 2
ReDim NewCoord(UBound(Coord)) As Double
For i = 0 To UBound(Coord) - 1 Step 2
NewCoord(i/2) = Coord(i)
NewCoord(i/2) = Coord(i + 1)
Next i
end if 上面Newcoord()就是各顶点坐标 以上是求一个矩形四个顶点坐标的程序!哪位高手帮我逐行解析一下啊!谢了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-28 00:51 , Processed in 0.156999 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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