.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there an equal function like InventorApplication.Ready in ACAD?

4 REPLIES 4
Reply
Message 1 of 5
Passi
398 Views, 4 Replies

Is there an equal function like InventorApplication.Ready in ACAD?

Hi to all,

 

I've started AutoCAD and want to check if the process is being completly loaded and ready to get other commands.

 

In Inventor there's an function that gives true or false if Inventor is completly loaded. Is there something equal in AutoCAD? (InventorApplication.Ready)

 

Best Regards

 

Passi

4 REPLIES 4
Message 2 of 5
Marat.Mirgaleev
in reply to: Passi

Could you check, please, if Editor.EnteringQuiescentState event can help?


______________________________________________________________

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!





Marat Mirgaleev
Developer Technical Services
Autodesk Developer Network
Message 3 of 5
Passi
in reply to: Marat.Mirgaleev

Hi and thanks to the Tip.

 

I've searched a little bit more and found this one:

 

Application.GetAcadState.IsQuiescent

 

Seams to be in the same direction or get I wrong? I don't know the word "Quiescent", but I think it should be something like "I'm waiting for some input" 🙂

 

Best Regards

 

Passi

Message 4 of 5
Passi
in reply to: Passi

I tried this, and it seems to work:

 

        Dim Retry As Boolean
        Retry = True
        While Retry = True
            Try
                While ACAD.Application.GetAcadState.IsQuiescent = False
			'wait
End While Retry = False Catch IfCallsRejected As Exception Retry = True End Try End While

Please correct me, if I've done something terrible wrong thing 🙂

 

The Try and Catch Block with the Retry While Loop seems to be necessary in my case. sometimes vb.net gots an error message:

 

RPC_E_CALL_REJECTED

 

and the only way I've found to get away from it, is only to retry the same thing again and it's working.

 

Best Regards

 

Passi

Message 5 of 5
Marat.Mirgaleev
in reply to: Passi

I think the problem is that your While cycle does not let incoming messages to be processed. From this point of view, subscription to the even is a better solution.



Marat Mirgaleev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost