The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

#272921
Hi,

I've registered to the API platform in order to try and develop my own addon.
I am a bit familiar with coding such as HTML and a bit of JavaScript, but my C++ skills are unknown.

I've read through the basic explanations on:
http://archicadapi.graphisoft.com/api-reference

But sadly a lot of it is confusing to me, being a non-programmer.

The first thing that I would like to ask, is how to 'start' my add-on. The instructions say I need an 'MDID' resource in the form of:

Code: Select all'MDID' 32500 "Add-On Identifier" {
        developerID
        localID
    }


But I am not sure how to create this. Is any IDE sufficient? Do I specifically need a Visual Studio platform for this? What file type is this saved as?


Regarding the process in the link:
https://helpcenter.graphisoft.com/technotes/setup/software-technologies/getting-started-with-the-api-devkit/

the issue is the "AddOnAdmin". From what I can tell, this is just the add-on manager in ArchiCAD right? When I go to the add-on manager though, I have no option to make a "New Database" as they ask and insert my developer ID and so forth...


So right now I really want to start figuring out specifics of how and what to code for an add-on but I can't figure out the initial steps to start doing this.

I'm also a bit unclear about which file types the code needs to be saved as in general and if there is a specific folder structure within my addon folder that I need to respect.

I've marked all the questions in Bold and would be happy if someone knows how to answer any of them :)

Thank you!
#272927
If you are not yet a solid programmer and an experienced ARCHICAD user, the ARCHICAD API is not the place to learn. You should be able to answer most of your bold questions yourself when you are ready to be here.

Take an in-person or online class and become proficient developing simple apps in C++ and Visual Studio if you are using Windows or XCode if you are on a Mac. Then consider layering the complexity of AC development on those basic skills later.

Good luck!
#274214
I have a few questions without opting in on the API website. I found it quite closed without any answers.

Do we have control over Archicad itself or only the model database? Can I start archicad, close the warning windows, start publishing without any user interaction?

How about C#? For revit we are using it and I have some experience with it but not with C++. Although it is kind of similR I'm not really willing to jump into it for smaller tasks.
#274225
daninet wrote:Do we have control over Archicad itself or only the model database? Can I start archicad, close the warning windows, start publishing without any user interaction?

How about C#? For revit we are using it and I have some experience with it but not with C++. Although it is kind of similR I'm not really willing to jump into it for smaller tasks.


My understanding from some time back - Ralph, Akos or someone can clarify:

There is no interface to fully control ArchiCAD by an independent process. No, you cannot close warning windows. Yes, an add-on can invoke Publisher on a publish set...but only after invoking the add-on. (Example in the Navigator-Test sample add-on in the devkit.) Typical add-ons are invoked by the user explicitly (menu or shortcut keys) and have access to the databases. Add-ons can be associated with building elements and can be invoked when a user touches/modifies those elements.

I think it would require way more work to make everything work with C# (if even possible) than it would to learn C++. See this topic:
http://archicad-talk.graphisoft.com/vie ... hp?t=55976

For AC21 API development, the following are the environments for which all tools are designed (from the API docs):

Windows: Microsoft Visual C++ 2015 Update 3 installed. Only the 64-bit architecture is supported

macOS: Xcode 7+ (Xcode 8+ recommended)
#274256
So this is the reason there are no great tools like Clarity for Revit in the market for Archicad.

Automation is the way to go and controlling your software automated is a huge potential. Think about scheduled exports, scheduled archiving ect. that require no manpower.
I would really looking forward to have something like this, also to prepare it to myself.
#274257
daninet wrote:I have a few questions without opting in on the API website. I found it quite closed without any answers.

Do we have control over Archicad itself or only the model database? Can I start archicad, close the warning windows, start publishing without any user interaction?

How about C#? For revit we are using it and I have some experience with it but not with C++. Although it is kind of similR I'm not really willing to jump into it for smaller tasks.

Karl has done a good job of answering your questions. Just to expand a bit:
- The API is primarily about interacting with the user and doing things to the project model. It's also possible to interact with the host OS, do network-based operations and work with files. You can interact with other processes and control ARCHICAD to some extent, but it relies more on work-arounds than explicit API support. I've have written add-ons to support automation via external applications, but it felt like swimming against the tide.

- Use C++ for ARCHICAD development. Direct use of C# isn't an option. Karl has correctly identified suitable development software.