- 积分
- 681
- 明经币
- 个
- 注册时间
- 2004-3-23
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
目的是读取一条直线的起点终点坐标,调试的时候说类型不配,就是倒数第二句,谢谢指点。
Private Sub CommandButton1_Click() Dim startPoint As Variant Dim endPoint As Variant Dim objName As String Dim entry As AcadEntity For Each entry In ThisDrawing.ModelSpace objName = entry.ObjectName If objName = "acadline" Then startPoint = entry.startPoint endPoint = entry.endPoint End If Next MsgBox "This ellipse has a start point of " & startPoint(0) & ", " & startPoint(1) & ", " &_ startPoint(2) & " and an endpoint of " & endPoint(0) & ", " & endPoint(1) & ", " &_ endPoint(2), vbInformation, "StartPoint Example" End Sub |
|