[SOLVED] ACAPI_Element_GetMemo error: APIERR_REFUSEDCMD
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2016-12-16
04:55 PM
- last edited on
‎2023-07-12
08:59 PM
by
Doreena Deng
‎2016-12-16
04:55 PM
Hello,
I am getting this error in my Addin: APIERR_REFUSEDCMD while attempting to get the Memo of Rooms(API_ZoneID), ONLY when I call my function from a managed WPF Control (mixed code).
Are there any locks happening automatically when the API is used without an ArchiCAD UI trigger? What could be the problem here? I am a little confused.
I have checked the GUIDs and they are unchanged as when I call the function from a Menu Command, also I can access all Informations at the "element.zone..." level and also the IFC Properties, just the memo throws this error.
I would be very glad to get some suggestions. Thanks in advance!
*DEVENV: Windows 10, VS2012, AC20
I am getting this error in my Addin: APIERR_REFUSEDCMD while attempting to get the Memo of Rooms(API_ZoneID), ONLY when I call my function from a managed WPF Control (mixed code).
Are there any locks happening automatically when the API is used without an ArchiCAD UI trigger? What could be the problem here? I am a little confused.
I have checked the GUIDs and they are unchanged as when I call the function from a Menu Command, also I can access all Informations at the "element.zone..." level and also the IFC Properties, just the memo throws this error.
I would be very glad to get some suggestions. Thanks in advance!
*DEVENV: Windows 10, VS2012, AC20
Labels:
- Labels:
-
Add-On (C++)
13 REPLIES 13
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2016-12-30 09:57 AM
‎2016-12-30
09:57 AM
Thank you all for the replies, the Problem is for the Moment resolved. Do you consider this mechanism unadvisable even though the WPF Form will call exclusively read-only functions?
Is there some kind of Roadmap for further developing concurrency?
Is there some kind of Roadmap for further developing concurrency?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-04 11:31 AM
‎2017-01-04
11:31 AM
mar_kq wrote:Yes, because for example the main thread could be in the middle of a database transaction, where the internal state of the application is not consistent.
Thank you all for the replies, the Problem is for the Moment resolved. Do you consider this mechanism unadvisable even though the WPF Form will call exclusively read-only functions?
Is there some kind of Roadmap for further developing concurrency?
Also the API uses a few globals

We don't plan further development in this area at the moment, having two different solutions already (see my previous comment).
Best, Akos

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-04 12:42 PM
‎2017-01-04
12:42 PM
Hi Akos,
ACAPI_Command_CallFromEventLoop works but not so easy to use.
May be better to add one more thread safe function for easy using
Something like:
ACAPI_Register_CallFromEventLoop( CallbackProc* )
It will call the callback from the event loop
ACAPI_Command_CallFromEventLoop works but not so easy to use.
May be better to add one more thread safe function for easy using
Something like:
ACAPI_Register_CallFromEventLoop( CallbackProc* )
It will call the callback from the event loop
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-01-06 11:06 AM
‎2017-01-06
11:06 AM
Oleg wrote:The reason why we chose this mechanism because it's already known for the API developers. Otherwise how would you implement data pass through from that thread to AC, and then back to the add-on from the main thread?
Hi Akos,
ACAPI_Command_CallFromEventLoop works but not so easy to use.
May be better to add one more thread safe function for easy using
Something like:
ACAPI_Register_CallFromEventLoop( CallbackProc* )
It will call the callback from the event loop
Best, Akos
- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »