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

ACAPI_Command_CallFromEventLoop sometimes returns APIERR_REFUSEDCMD

someone
Participant

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.

3 REPLIES 3

Hi,


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?

 

Best,
Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: bschwb.com

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 - Get Add-Ons & Archicad Tips on my Website: bschwb.com