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

Confusion about starting add-on development

Anonymous
Not applicable
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...

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
Anonymous
Not applicable
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
Anonymous
Not applicable
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
Anonymous
Not applicable
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
Anonymous
Not applicable
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
Anonymous
Not applicable
Ralph wrote:
You could do that with GDL objects.
Thanks, I'll look into this functionality
Anonymous
Not applicable
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