ACAPI_Command_CallFromEventLoop sometimes returns APIERR_REFUSEDCMD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2023-02-15 04:24 PM
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.
- Labels:
-
Add-On (C++)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2023-02-17 11:08 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2023-02-17 01:49 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2023-03-02 10:56 AM
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.