MJTD_7777 发表于 2005-12-20 15:07:00

[VBA]获取acad的运行状态

<PRE class=Code>Sub Example_IsQuiescent()
    ' This example gets the acadState object and checks to see if
    ' AutoCAD is in a quiescent state.
    Dim State As AcadState
    Set State = GetAcadState
    If State.IsQuiescent Then
      MsgBox "AutoCAD is quiescent."
    Else
      MsgBox "AutoCAD is not quiescent."
    End If
End Sub</PRE><PRE class=Code>以上代码在VBA中可以,但是在VB中确不行</PRE><PRE class=Code>Set AcadApp = GetObject(, "autocad.application")<BR><BR>If Not AcadApp.GetAcadState.IsQuiescent Then MsgBox "g"</PRE><PRE class=Code>如果Acad有命令正在运行,程序会停在AcadApp.GetAcadState.IsQuiescent 处。</PRE><PRE class=Code>那位高手调试过这个程序!!!</PRE><PRE class=Code>&nbsp;</PRE>
页: [1]
查看完整版本: [VBA]获取acad的运行状态