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 以上代码在VBA中可以,但是在VB中确不行 Set AcadApp = GetObject(, "autocad.application")
If Not AcadApp.GetAcadState.IsQuiescent Then MsgBox "g" 如果Acad有命令正在运行,程序会停在AcadApp.GetAcadState.IsQuiescent 处。 那位高手调试过这个程序!!! |