- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-8-24 11:53:00
|
显示全部楼层
你要的是这种效果么?
Sub Test() On Error GoTo ErrHandle Dim pFrom, pTo Dim p1(3) As Double, p2(1) As Double Dim pPL As AcadLWPolyline pFrom = ThisDrawing.Utility.GetPoint(, vbCr & "请输入第一点:") pTo = ThisDrawing.Utility.GetPoint(pFrom, vbCr & "请输入下一点:") p1(0) = pFrom(0): p1(1) = pFrom(1) p1(2) = pTo(0): p1(3) = pTo(1) Set pPL = ThisDrawing.ModelSpace.AddLightWeightPolyline(p1) Do While True pTo = ThisDrawing.Utility.GetPoint(pTo, vbCr & "请输入下一点:") p2(0) = pTo(0): p2(1) = pTo(1) pPL.AddVertex (UBound(pPL.Coordinates) + 1) / 2, p2 Loop ErrHandle: End Sub |
|