toosimple 发表于 2007-6-7 20:27:00

<p>“用LISP和VBA联合实现VBA的快揭运行,但是在userform1中的pnt=thisdrawing.utility.getpoint(,"getpoint...")语句执行时,Cad绘图窗口无光标,命令行无显示,按任何键无反应,按下Esc时报错“getpoint作用于对象IAcadUtility时失败”!谢了先!!”</p><p></p><p></p><p>对啊,我也遇到了这个问题,大家有什么好的解决方法吗,谢谢</p>

fangmin723 发表于 2020-4-18 21:24:34

把窗体的showmodal改成false
或者前后加Me.Hide和Me.show
Private Sub Pickwidhig_Click()
    Me.Hide
    Dim P1 As Variant, P2 As Variant, P3 As Variant, zwdoc As ZcadDocument
    Set zwdoc = ZWCAD.ZcadApplication.ActiveDocument
    P1 = zwdoc.Utility.GetPoint(, "请指定列宽起始点:")
    P2 = zwdoc.Utility.GetPoint(P1, "请指定行高起始(列宽结束)点:")
    P3 = zwdoc.Utility.GetPoint(P2, "请指定行高结束点:")
'    colwid.Text = Abs(P2(0) - P1(0))
'    rowhig.Text = Abs(P3(1) - P2(1))
    Me.show
End Sub
页: 1 [2]
查看完整版本: [VBA]请教getpoint作用于对象IAcadUtility时失败