Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Confusion about starting add-on development

yafimski
Newcomer
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:
'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!
29 REPLIES 29

Karl Ottenstein
Moderator
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!
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6, iMac Pro

daninet
Newcomer
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 Ottenstein
Moderator
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/viewtopic.php?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)
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6, iMac Pro

daninet
Newcomer
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.

Ralph Wessel
Mentor
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.
Ralph Wessel BArch

Hi,

Can anyone help me? I installed a development kit 21 and launched Geometry (Geometry_Test) add on from the samples. It was built successfully and I could even debug it but there was no result after launching it. As far as I got it there should be created a rectangular and then it should be transformed. Am I wright?

Ralph Wessel
Mentor
Have you tried running the add-on without an ARCHICAD license? The examples do not specify a developer code and will only work in demo mode.
Ralph Wessel BArch

Thanks for your reply. Yes, installed the Archicad 21 in trial mode and registered as a developer. Has I got it right I should have a paid license in order to test add ons?

Ralph Wessel
Mentor
No, you don't need a paid ARCHICAD license to test the add-ons.
Ralph Wessel BArch

Ralph wrote:
No, you don't need a paid ARCHICAD license to test the add-ons.
It's really odd for me, that the provided example does nothing. Is there any description about "Geometry (Geometry_Test)" sample? Or any other recommendations

Thanks

Ralph Wessel
Mentor
When the add-on is built and present in the Add-Ons folder when ARCHICAD is launched, do you see a menu item Test > Geometry Functions > Rotate Lines (place a rectangle) in the main menu bar?
Ralph Wessel BArch

Ralph wrote:
When the add-on is built and present in the Add-Ons folder when ARCHICAD is launched, do you see a menu item Test > Geometry Functions > Rotate Lines (place a rectangle) in the main menu bar?
Yes, I can see it. And I click it to start debugging

Ralph Wessel
Mentor
When you use the menu item for this add-on, check if the lines are placed on another storey, e.g. one above the ground floor. I find the lines appearing on the first floor.
Ralph Wessel BArch

Ralph wrote:
When you use the menu item for this add-on, check if the lines are placed on another storey, e.g. one above the ground floor. I find the lines appearing on the first floor.
Yes it works perfectly, thank you Ralph a lot.

One more question. I need add a point on the scene to be visible in 3D mode .
Is it possible to draw some points on the scene be using OpenGl? For example, like that
glPointSize(2);
glBegin(GL_POINTS);
glColor3d(1,0,0);
glVertex3d(-4.5,4,0); // first point
glColor3d(0,1,0);
glVertex3d(-4,4,0); // second point
glColor3d(0,0,1); // third
glVertex3d(-3.5,4,0);
glEnd();
I need to know about context and subscribe to event something similar to BufferSwapNotify in SolidWorks. Any recommendations?

Thanks.

Ralph Wessel
Mentor
No, I don't think it's possible to interact with ARCHICAD's 3D mode like that. You can do that in a custom window, but I doubt that's what you want.

How about using GDL objects placed in the model to achieve what you want?
Ralph Wessel BArch

Ralph wrote:
No, I don't think it's possible to interact with ARCHICAD's 3D mode like that. You can do that in a custom window, but I doubt that's what you want.

How about using GDL objects placed in the model to achieve what you want?
Could you please advise me how to create something similar to point cloud. I want to generate points in my add on and place them on scene. I know I can import point clouds of some formats, how can I create point cloud in add on?

Ralph Wessel
Mentor
You could do that with GDL objects.
Ralph Wessel BArch

Ralph wrote:
You could do that with GDL objects.
Thanks, I'll look into this functionality

Ralph wrote:
You could do that with GDL objects.
I have some questions about GDL objects:

1. Should I create a GDL add on in order to render point clouds on the scene or I can use GDL object in ordinary add on?
2. In case of GDL add on should it be created only on C language?

Thanks

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!