License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

Getting Started with the API DevKit

stefan
Advisor
I welcome this more open and friendly approach to independent developers, although I still have a few remarks: I started trying to write a simple plugin for Archicad and all I can say is that it stopped at trying. The plugin is compiled but not recognised by Archicad. And I can't seem to find out why.
I wonder if it would be possible to have a few ready-to-compile examples in the Devkit. The samples are not compiling either... and seem to be made for an older version of the DevKit. In fact, I think the resource compiler is crashing...

I'm sorry to say, but I made my first fully working AutoCAD ObjectARX-plugin after stepping through the included ARX-tutorials just half an hour after downloading the SDK. I can't say that about the Archicad DevKit.

I really hope that I can get it at least to work... I wonder why there is no open forum on Developments for Archicad. After all, it's what made AutoCAD and 3DStudio so popular.

-----------------------

Don't see my mail as completely negative. I see that Graphisoft is trying hard to open up the development for other interested parties (e.g. freelancers, academic research), but since I'm not a fully qualified programmer (I have an architectural degree, not a programming degree), it's hard to get started. It's not that I'm a total newbie, since I have written a few programs allready using C++, MFC and OpenGL, but at the moment it's not working either.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
29 REPLIES 29
Akos Pfemeter
Graphisoft
Graphisoft
Dear Stefan,
The plugin is compiled but not recognised by ArchiCAD. And I can't seem to find out why.
You need an authorization code to run your Add-On with the full version of ArchiCAD. Without this code you can run it with the demo version only. You can get an authorization code via the http://www.graphisoft.com/support/developer/policy/index.html for free.
The samples are not compiling either... and seem to be made for an older version of the DevKit.
Please note that the examples will also work only with the demo version of ArchiCAD.
I wonder why there is no open forum on Developments for ArchiCAD.
There is one since then, so you have a place now to discuss these kinds of problems with fellow developers. You can find the Developer Forum under ArchiCAD+...

Akos Pfemeter

VP Global Cross-Brand Sales, Graphisoft

stefan
Advisor
Akos,

I have an authorisation code. It's just that I had trouble using it in the right way (that is, I failed to understand that the code from the AddOn Management tool had to be "exported" into a header file where they are turned into #define statements and that these were the ones that I had to use in the compilation process.

I Graphisoft will ever publish some basic tutorial, these steps are not easy to understand for a beginner and then it's very hard to get started 😉

I got it working now. At least my simple plugin did compile and was recognised by ArchiCAD 8.1 full version. It still does nothing, but at least I'm up and running, so to speak.

Are you positive that the examples are not working in the full version? So I need a demo version to test them out? Seems strange. Anyway, the "resconv"-application is crashing, so I still think that the examples are not fully working at the moment.
--- 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 Pfemeter
Graphisoft
Graphisoft
Stefan,
I Graphisoft will ever publish some basic tutorial, these steps are not easy to understand for a beginner and then it's very hard to get started
Yes. I agree that this is the way to go and we have plans but I cannot give you an exact schedule now...

Are you positive that the examples are not working in the full version?
You have to recompile them using your authorization code and then they will be running with the full version of ArchiCAD.

Akos Pfemeter

VP Global Cross-Brand Sales, Graphisoft

Karl Ottenstein
Moderator
I'm glad to hear that there are plans for a 'getting started' tutorial. In the meantime, we now have this forum! 😉

I agree with Stefan that it is a challenge to get started, even though GS delivers many working sample add-ons with the SDK.


Let me try to summarize for newbies. (Writing an actual tutorial with screenshots will take more time than I have just now.) The API SDK samples compile just fine as downloaded, but will only run in the demo version of AC without inserting registered developer ID and add-on codes.

You can obtain a developer ID and authorization code at no charge by filling out the application on the page given by Akos:
http://www.graphisoft.com/support/developer/policy/index.html

Once you have your own ID, you can run the AddOnAdmin tool to generate an add-on ID and also get the decimal equivalent of your four-character Developer ID. For Windows users, the AddOnAdmin tool is by default in

Program Files\Graphisoft\API Development Kit 5\Support\Tools\Win\AddOn Management

Click Create a New Addon to generate a new ID. Select the first line of the database tree (shows your Dev ID), click Save Database As, and choose *.h as the file type. Personally I don't use the names in that file, but grab the numbers.

[NOTE: Keep these numbers to yourself.]

You can only create 256 (I think?) add-on ID's from your single Developer ID. The pairing of DevID/Add-on ID uniquely identifies an add-on and AC will only load one add-on with that pairing. Of course, it also uniquely identifies your add-ons to Graphisoft should a user ever have a problem because of one.

I suggest just generating a single add-on ID and using that one for all of your exploration of the samples and your first real add-on just so you don't have to manage the extra ID's. Up to you!


Take the two numbers that were generated in the *.h file and copy them into the *.grc file (Graphisoft Resource Compiler) for the Example add-on which can be found in the sample's RFIX folder. Part of the *.grc file for the "Goodie_Functions" example add-on reads:
@ #include "MDIDs_APICD.h"
'MDID' 32500 "Add-On Identifier" {
	MDID_APICD
	MDID_APICD_GoodieFunctions
}

The ID's for the MDID are coming from the MDIDs_APICD.h file. For quick and dirty testing, ignore that file and edit things to read
'MDID' 32500 "Add-On Identifier" {
	MyDevID
	MyAddonID
}
where MyDevID and MyAddonID are the two numbers you copied from the AddOnAdmin *.h output. Alternatively (the proper way), edit the MDIDs_APICD.h file that can be found in

\Program Files\Graphisoft\API Development Kit 5\Support\Inc

and substitute your developer ID for the value of MDID_APICD, and edit the add-on ID's too.


Compile, and the add-on will work in the full version of AC. If you use the same AddonID for testing each example as I do, then of course you have to unload the previous one before you can load and test the next one.


Other ideas / corrections? Maybe we can do something prettier with screenshots later if there is demand...

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Im sorry guys, im really new to this thing. I have been making GDL Objects and accessories for about 2 years and want to explore the greater functionality offered with add-ons. Do i need Microsoft visual C++ or similar to compile or can i do it all through the developer kit?

thanks,
mark
stefan
Advisor
Mark wrote:
Im sorry guys, im really new to this thing. I have been making GDL Objects and accessories for about 2 years and want to explore the greater functionality offered with add-ons. Do i need Microsoft visual C++ or similar to compile or can i do it all through the developer kit?

thanks,
mark
You need Visual Studio (or standalone Visual C++) to compile add-ons if you are using Windows. The SDK provides the headers and libraries.
--- 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
I have Visual C++ express edition 2005 that should work shouldnt it?
Thanks again
mark
stefan
Advisor
Mark wrote:
I have Visual C++ express edition 2005 that should work shouldnt it?
Thanks again
mark
I haven't tried that...
See http://archicad-talk.graphisoft.com/viewtopic.php?t=15860
--- 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 guys,

May I make add-ons with Visual Basic 2008.net ?

thanks,
TAI