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

application is busy in customized version of Script Pro 2

1 REPLY 1
SOLVED
Reply
Message 1 of 2
wesbird
986 Views, 1 Reply

application is busy in customized version of Script Pro 2

Hi,
I'm modified Script Pro 2 from autodesk lab. Now I have this problem, sometimes, I got this error message

"The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"
at

object ret = ActiveDocument.GetType().InvokeMember(
"SendCommand",
BindingFlags.InvokeMethod,
null, ActiveDocument, OnedataArray
);

 or

short fd = (short)ActiveDocument.GetVariable("FILEDIA");

 ActiveDocument come from 

ActiveDocument =
AcadDocuments.GetType().InvokeMember(
"Open",
BindingFlags.InvokeMethod,
null, AcadDocuments, ThreeVariable
);

 

I understand those are out-process call. Maybe AutoCAD is still doing something when it happens. right now I increase the wait time right before the call like:

Thread.Sleep(100) -> Thread.Sleep(500)

 

what should I do to avoid this problem.

 

Thanks

Wes

Windows 10 64 bit, AutoCAD (ACA, Map) 2023
1 REPLY 1
Message 2 of 2
Virupaksha_aithal
in reply to: wesbird

Hi,

 

I suggest you to use IsAcadQuiescent() before sending the command to AutoCAD. IsAcadQuiescent is implemented in ScriptPro specifically to check for AutoCAD state.



Virupaksha Aithal KM
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