We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2004-06-15 07:45 PM - last edited on 2023-08-07 12:21 PM by Doreena Deng
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...
2004-06-15 10:28 PM
Tor wrote:Have you downloaded the ArchiCAD API Developer Kit yet? You will find both documentation and example projects in the kit. The example projects are mostly pretty basic, and give you an overview of what the API can do. You can use an example project as the basis for starting your own too.
- 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?
Tor wrote:You can debug, set break points, inspect variable/memory, etc. You need to set ArchiCAD as the target executable in your runtime settings so that it is launched when you 'Run' your add-on, and the build settings need to be appropriate for debugging, e.g. low optimisation. I could be more specific if you can provide a brief description of the platform you are using, e.g. OS, IDE/compiler, AC version, etc.
- 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?
2004-06-15 11:35 PM
TJ wrote:Just to add 2 cents to Ralph's excellent reply...
- 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?
2004-06-16 02:49 AM
2004-06-16 08:24 AM
2004-06-16 09:33 AM
// ***************************************************************************** // tutorial.h // AddOn unique IDs // // ***************************************************************************** // ----------------------------------------------------------------- // Developer: 'XXXX' // ----------------------------------------------------------------- #define TUTORIAL_H 1234567890 // Unnamed #define TUTORIAL_H_HelloWorld 0987654321(Your numbers will vary, apparantly)
2004-06-16 02:05 PM
RFIX.WIN\..\Debug\HelloWorldFix.grc.rc2 (26): error RC2104 : undefined keyword or key name: WIN_LANGUAGE_IDAdd the Developer ID
#include <Windows.h> #define INT__APP #define INTERNAL_NAME "HelloWorld" #define ORIGINAL_NAME "HelloWorld.apx" #if !defined (WINDOWS) #define WINDOWS #endifI guess the strings don't matter that much, but the first define made the lookup in the Localization header work.
2004-06-16 02:17 PM
2004-06-16 02:31 PM
GSErrCode __ACENV_CALL CommandHandler (const API_MenuParams * /*params*/) { ACAPI_WriteReport ("Hello World", true); return NoError; } // CommandHandler ()In ArchiCAD unload and reload your plugin and go to the newly entered menu Tools > Sample Menu
2004-06-16 02:53 PM