Got a minute? We appreciate your feedback:

Graphisoft Learn survey
Archicad C++ API
About Archicad add-on development using the C++ API.

ACAPI_Command_CallFromEventLoop sometimes returns APIERR_REFUSEDCMD


Hello there,
I need to make a call from the main thread, but ACAPI_Command_CallFromEventLoop only works sporadically and sometimes (not always) returning APIERR_REFUSEDCMD, despite me using the exact example provided in the documentation (for some reason it's not in the SDK examples).

Does anybody know why that is or what that means? Tested on Archicad 24.



If you used the exact example, maybe you need to replace the MDID values with appropriate ones for you Add-On. What values did you use there?



Bernd Schwarzenbacher - Archicad Add-On Developer - (Add-On Downloads & Articles)

Sorry, 'exact' was maybe the wrong wording. I changed the MDID values to ones I know are working and the call sometimes works too so this can't be the problem I would think.

OK so that's probably not the issue then.
If you can post the source code for us to compile and try, then I could give it try to debug it.

Bernd Schwarzenbacher - Archicad Add-On Developer - (Add-On Downloads & Articles)

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!