VB-Autocad relationship

VB-Autocad relationship

Anonymous
Not applicable
299 Views
1 Reply
Message 1 of 2

VB-Autocad relationship

Anonymous
Not applicable
Hi,

I wrote a little app in VB that will insert blocks having specific values from an excel file. Everything works fine if the autocad is idle, but if there is an active command like line command, of course the vb exe will give me a message that Autocad is busy. I have my reasons to run this application outside of Autocad, as a separate exe file. My question is: can I somehow check from the exe file if there is an active command running in Autocad and cancel it (like esc key) and then continue with block placing? Or, if Autocad is busy, can I "convert" this into a message(from VB) and than wait until AutoCad is idle? My feeling is that I cannot do this, but I will appreciate any opinion.

Thanks
0 Likes
300 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
i think there is property checking is acad bussy
----
Sub Example_IsQuiescent()
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
----

just don't know why such a crypitc name "quiscent"
0 Likes