- 积分
- 509
- 明经币
- 个
- 注册时间
- 2005-2-1
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2005-3-8 20:07:00
|
显示全部楼层
On Error Resume Next
Dim line1 As AcadLine Dim firstPoint As Variant Dim bpt1 As Variant: bpt2 As Variant: bpt3 As Variant
firstPoint = ThisDrawing.Utility.GetPoint(, vbCrLf & "请插入")
bpt1 = firstPoint bpt2 = ThisDrawing.Utility.GetPoint(bpt1, "请插入")
Set line1 = ThisDrawing.ModelSpace.AddLine(bpt1, bpt2)
Err.Clear
Do While Err.Number = 0 bpt3 = ThisDrawing.Utility.GetPoint(bpt2, "请插入") Set line1 = ThisDrawing.ModelSpace.AddLine(bpt2, bpt3) bpt2 = bpt3 Loop
程序为连续画线,通过右键结束. 在画线过程中,一旦点击对象捕捉工具条,使用临时捕捉,程序就会跳出. 错误为"未知命令".
|
|