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

Blank Add On for AC19 / DevKit19

Anonymous
Not applicable
After this failed experiment with the Archicad AddOn Wizard, i decided to create my own blank addon template for DevKit 19

Notes:
1- Remember to change the IDs in "/Src/MyDID.h" and "/RFIX/AC_BlankAddOnFix.grc". Explained in detail here.
2- works when placed in the "Examples" folder of the API DevKit.

Hope this is will be of use to those looking for a starting point. Cheers. Adl
6 REPLIES 6
stefan
Advisor
Thank you for sharing. I can also suggest to start from the smallest Devkit example: Geometry_Test


It would be nice to have a blank add-in which also compiles on OSX.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Anonymous
Not applicable
Hi,

I've noticed that in the BlankAddOn the .grc file isn't entirely correct.
The info on the status bar should be:
'STR#' 32501 "Status bar strings" {
/* [ ] */ "Blank"
/* [ 1] */ "Do Nothing"
}

Instead of:
'STR#' 32520 "Status bar strings" {
/* [ ] */ "Blank"
}
Akos Somorjai
Graphisoft
Graphisoft
stefan wrote:
Thank you for sharing. I can also suggest to start from the smallest Devkit example: Geometry_Test


It would be nice to have a blank add-in which also compiles on OSX.
Both devkits have add-ins for their respective development environments, and those set up skeleton add-ons.

Best, Akos
Akos Somorjai
Graphisoft
Graphisoft
Gill wrote:
Hi,

I've noticed that in the BlankAddOn the .grc file isn't entirely correct.
The info on the status bar should be:
'STR#' 32501 "Status bar strings" {
/* [ ] */ "Blank"
/* [ 1] */ "Do Nothing"
}

Instead of:
'STR#' 32520 "Status bar strings" {
/* [ ] */ "Blank"
}
That depends on how you register your menu. The original is correct if you pass MenuCode_UserDef to your ACAPI_Register_Menu function.

Best, Akos
stefan
Advisor
Akos wrote:
stefan wrote:
Thank you for sharing. I can also suggest to start from the smallest Devkit example: Geometry_Test


It would be nice to have a blank add-in which also compiles on OSX.
Both devkits have add-ins for their respective development environments, and those set up skeleton add-ons.

Best, Akos
What is the recommended approach for developing Win + Mac add-ons? Preferably, we would have a single Add-in source folder, with Visual Studio & Xcode project files and with a single set of CPP/H files. Then it could be used in e.g. git or other source control systems to be shared among team members.

Alas, I've had not much luck on OSX with the add-on template and usually stick to copying an example project and renaming things over there.

I was even thinking of setting up a cmake or qmake script to generate two projects from a single source. This could make it more flexible in integrating it into your environments.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Akos Somorjai
Graphisoft
Graphisoft
stefan wrote:
What is the recommended approach for developing Win + Mac add-ons? Preferably, we would have a single Add-in source folder, with Visual Studio & Xcode project files and with a single set of CPP/H files. Then it could be used in e.g. git or other source control systems to be shared among team members.

Alas, I've had not much luck on OSX with the add-on template and usually stick to copying an example project and renaming things over there.

I was even thinking of setting up a cmake or qmake script to generate two projects from a single source. This could make it more flexible in integrating it into your environments.
You can see the setup we use in the Examples. Each add-on has the following folders (empty ones are usually omitted):

RFIX -- non-localisable resources
RFIX.mac -- non-localisable resources for OSX
RFIX.win -- non-localisable resources for Windows
RINT -- localisable resources
RINT.mac -- localisable resources for OSX
RINT.win -- localisable resources for Windows
Src -- source and header files (may contain subfolders); on its top level we usually keep the platform independent sources, platform specific stuff goes into subfolders

We keep external libraries and sources in a separate MakeAdds folder somewhere in a central location.

You may also add a Make.mac and a Make.win folder for the project files.

Please share with us if you manage to set up any cmake files; I'd be interested

Best, Akos

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!