ACAPI_Command_Call
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-06-24
08:30 PM
- last edited on
‎2021-09-14
09:31 AM
by
Noemi Balogh
‎2021-06-24
08:30 PM
I am trying to find info about the second argument to ACAPI_Command_Call.
Examples have shown me two options - 'OBJO' and 'GDCO'.
- - What exactly is the 'identifier of the command'? I thought it would be the function name from the Add-on I was calling from that I want to run remotely. When I provide that, I get an error of "Too many characters for in character constant". So I am thinking there is a #define somewhere that might explain it a little more. No luck finding that.
- - What are the options, only the 2 I list above? And what do they mean?
- - How do I know when to use each option?
thanks -
GSErrCode ACAPI_Command_Call ( const API_ModulID* mdid, GSType cmdID, Int32 cmdVersion, GSHandle params, GSPtr resultData, bool silentMode ); Parameters cmdID [in] the identifier of the command to be executed.
Examples have shown me two options - 'OBJO' and 'GDCO'.
- - What exactly is the 'identifier of the command'? I thought it would be the function name from the Add-on I was calling from that I want to run remotely. When I provide that, I get an error of "Too many characters for in character constant". So I am thinking there is a #define somewhere that might explain it a little more. No luck finding that.
- - What are the options, only the 2 I list above? And what do they mean?
- - How do I know when to use each option?
thanks -
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-06-25 06:18 PM
‎2021-06-25
06:18 PM
As I dig into this a little more, I get to ACAPI_Register_SupportedService , which registers a command that can be used by other add-ons. Documentation on this shows an example:
that introduces another value forcmdID - - 'DWFO'. Any ideas on this one? My first thought is that when I use this to register the command, I can provide a logical name of my choice to be referenced later on by ACAPI_Command_Call.
Also, '4L' is the command version of the supported service - can you point me to further documentation of that for translation?
Please and thank you -
err = ACAPI_Register_SupportedService ('DWFO', 4L);
that introduces another value for
Also, '4L' is the command version of the supported service - can you point me to further documentation of that for translation?
Please and thank you -

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-09 10:09 PM
‎2021-07-09
10:09 PM
Hi! I haven't used this myself yet but I read through the documentation on it because I thought I could need it. I hope my thoughts on it can help a little anyway. I think the most important documentation page is: https://archicadapi.graphisoft.com/documentation/communication-manager .
Regarding the `cmdId` I also think that it's an identifier of your choice when you register the command. `cmdVersion` is also a version of your choice. I think of it as kind of like Archicad versions. E.g. You could add more functionality in your version 2 of your add-on and another add-on can then check if version 2 of is installed and use that extra functionality. "4L" in that example stands for version 4 where the number type is "long".
"parameters" seem to be the actual parameters to the command. Those parameters are then handled by an installed command handler (cf.https://archicadapi.graphisoft.com/documentation/acapi_install_modulcommandhandler and https://archicadapi.graphisoft.com/documentation/apimodulcommandproc ) and the return values are stored in "resultData".
For code you can take a look at the API example projects Communication_Manager and Communication_Client.
Hope this helps a little bit
Regarding the `cmdId` I also think that it's an identifier of your choice when you register the command. `cmdVersion` is also a version of your choice. I think of it as kind of like Archicad versions. E.g. You could add more functionality in your version 2 of your add-on and another add-on can then check if version 2 of is installed and use that extra functionality. "4L" in that example stands for version 4 where the number type is "long".
"parameters" seem to be the actual parameters to the command. Those parameters are then handled by an installed command handler (cf.
For code you can take a look at the API example projects Communication_Manager and Communication_Client.
Hope this helps a little bit

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-07-16 05:09 PM
‎2021-07-16
05:09 PM
Bernd,
Thanks for the information. I will look in to this when I can circle back around to that project.
It already sounds helpful though.
Thanks for the information. I will look in to this when I can circle back around to that project.
It already sounds helpful though.