[求助]VBA临时捕捉问题?
VBA进行取点时(thisdrawing.Utility.GetPoint),无法使用临时捕捉,有什么解决方法。 你自己有没有试过。如果试过请贴出你的代码。 On Error Resume NextDim line1 As AcadLine<BR>Dim firstPoint As Variant<BR>Dim bpt1 As Variant: bpt2 As Variant: bpt3 As Variant
firstPoint = ThisDrawing.Utility.GetPoint(, vbCrLf & "请插入")
bpt1 = firstPoint<BR>bpt2 = ThisDrawing.Utility.GetPoint(bpt1, "请插入")
Set line1 = ThisDrawing.ModelSpace.AddLine(bpt1, bpt2)
Err.Clear
Do While Err.Number = 0<BR> bpt3 = ThisDrawing.Utility.GetPoint(bpt2, "请插入")<BR> Set line1 = ThisDrawing.ModelSpace.AddLine(bpt2, bpt3)<BR> bpt2 = bpt3<BR>Loop
程序为连续画线,通过右键结束.<BR>在画线过程中,一旦点击对象捕捉工具条,使用临时捕捉,程序就会跳出.<BR>错误为"未知命令".<BR> 使用 Do While Err.Number <> -2147467259
页:
[1]