We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

[newbie] how about 'hello world'

Anonymous
Not applicable
When I wrote my introduction to the forum, Karl said
Looking at the PDF link that you posted, I think you're in for some "fun", Tor Jørgen! Welcome!
I'm glad for the welcome, but I worry that maybe I'm in over my head - I guess thats where the fun starts...

I'll just wait with the questions connected with my project and start really simple;

- in most of the languages I've looked at, there's always an example of how to write the simple 'hello world'-snippet. How do I do that in an addon?
- and then how does the real workprocess go, I'm thinking of debugging and setting breakpoints and beeing able to step through the code to see what happens where, and why... and how is the interaction with ArchiCAD?

--
Regards,
Tor Jørgen
41 REPLIES 41
Ralph Wessel
Mentor
Tor wrote:
Ralph wrote:
All the files should be set to compile for debugging (in the debug column in the main project window).
I'm not quite shure what you mean, but I've clicked the little dot under the little green bug in the main project window.
Yes, you've got it right
Tor wrote:
Now I can start ArchiCAD by clicking Run, but when I click Debug it says 'loading debugging data for target "add-on debug', but nothing happens...
Double check that ArchiCAD is specified as the Host Application in the project Runtime Settings. Also, have a look at Debugger Settings - the option to 'Stop on application launch' should be off.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
stefan wrote:
In Visual Studio 6.0 you can create a new ArchiCAD Add-on with the provided wizard.


I have API Development Kit 11.21 installed, ArchiCAD 11 installed, Visual Studio 6.0 installed and Visual Studio 2005 also installed... Where is wizard You are talking about? I'm able to compile examples, but creating new project is out of my range:/

Please help.
Karl Ottenstein
Moderator
bamboos wrote:
I have API Development Kit 11.21 installed, ArchiCAD 11 installed, Visual Studio 6.0 installed and Visual Studio 2005 also installed... Where is wizard You are talking about? I'm able to compile examples, but creating new project is out of my range:/

Please help.
During the installation of the devkit, it asks if you want to install the wizard. It won't install to VS 2005, only to VS 2003 AFAIK. All it does is give you a stripped down add-on with no functionality to use as a starting point. Similarly, you can just take the simplest of the example files and modify it...

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
Karl wrote:
During the installation of the devkit, it asks if you want to install the wizard.


I've just installed it once again... It didn't 😕
Karl wrote:
It won't install to VS 2005, only to VS 2003 AFAIK.


World is going forward... VS 2005 exists and lots of people use it. It's weird, that Graphisoft doesn't support it.
Karl wrote:
All it does is give you a stripped down add-on with no functionality to use as a starting point.


Exactly what I need... It would be nice to add Empty project to start with in SDK Examples. Right now I have to delete code which I don't need
Karl wrote:
Similarly, you can just take the simplest of the example files and modify it...


Exactly what I'm doing right now

Thanks for fast answer.

Maciek
stefan
Advisor
Initially, I was under the impression that you needed to compile an Add-on with Visual Studio 2003 to be compatible with ArchiCAD, but in another thread, it was assured that VS 2005 can work as well.

I've opened an old VS2003 solution inside VS 2005 and with some tinkering, I was able to compile and run it. Still some bugs in my code, but technically you should be fine.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Karl Ottenstein
Moderator
During installation, you should have seen the attached dialog.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
The appwizard just creates a stub add-on (compiles but does nothing), and optionally includes additional references to either the DM or Geom resources as shown in the screenshot here.

Karl
appwiz-options.gif
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
Attached is a zip with two blank add-on hiearchies, created by the wizard. Lacking the wizard, just use one of them. One does not include support for Dialog Manager and Geometry modules, the other does.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
Here are links to the wizard components themselves, which should be installed by the installer in your VS folder, for example:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcprojects

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
And, finally, here is the wizard itself which by default installs into:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCWizards

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB