cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Creating Polygonal opening on a wall

kency
Enthusiast

Hello team,

We are trying to create a polygon-shaped opening through Add-On. We were able to create a square opening but unable to create a polygon-shaped opening. We did some reverse engineering ie. Tried to fetch the element with type OpeningID after drawing one and inspected the element but could not see anything that would define the points of the polygon. Attached is the screenshot of the values that we could observe of the Opening element(there are two screenshots) and the model that we are inspecting. Is it something that has support in Add-On? We also noticed that the field extrusionGeometryData.customBasePolygon is marked as Reserved for future use.

 

GSErrCode GetOpeningDetails() {
    GSErrCode err = NoError;
    GS::Array<API_Guid> elemList;
    ACAPI_Element_GetElemList (API_OpeningID, &elemList);
    for (const API_Guid& guid : elemList) {
        API_Element element = {};
        API_ElementMemo memo;
        BNZeroMemory (&memo, sizeof (API_ElementMemo));
        element.header.guid = guid;
        err = ACAPI_Element_Get (&element);
        if (err != NoError) {
            std::cout << "Error when trying to get element" << std::endl;
            continue;
        }
        err = ACAPI_Element_GetMemo(guid, &memo);
        if (err != NoError) {
            std::cout << "Error when trying to get element memo" << std::endl;
            continue;
        }
    }
    return err;
}

 


openingimage.pngdebug2.pngdebug1.png
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Viktor Kovacs
Graphisoft
Graphisoft
  • API development Kit: An SDK to create Archicad functionalities using the general API. You can write import/export functionalities, access almost every data in your plan file, register your own user interface elements, and much more.
  • GDL Development Kit: An SDK to extend the GDL programming language with your own commands.
  • Library Development Kit: A set of tools that help you developing Archicad Library Objects (like doors, windows, objects, etc.). Provides tools for converting between text and gsm formats, packaging libraries, etc.
  • Rendering Development Kit: An SDK to develop rendering Add-Ons (like Basic or Cineware renderer). These Add-Ons integrate well with the Rendering and Surface Settings dialogs, and has access to APIs related to rendering.

View solution in original post

3 REPLIES 3
Solution
Viktor Kovacs
Graphisoft
Graphisoft
  • API development Kit: An SDK to create Archicad functionalities using the general API. You can write import/export functionalities, access almost every data in your plan file, register your own user interface elements, and much more.
  • GDL Development Kit: An SDK to extend the GDL programming language with your own commands.
  • Library Development Kit: A set of tools that help you developing Archicad Library Objects (like doors, windows, objects, etc.). Provides tools for converting between text and gsm formats, packaging libraries, etc.
  • Rendering Development Kit: An SDK to develop rendering Add-Ons (like Basic or Cineware renderer). These Add-Ons integrate well with the Rendering and Surface Settings dialogs, and has access to APIs related to rendering.
kency
Enthusiast

Thank you @Viktor Kovacs . I have explored a bit on the API development kit since 2 months. Have understood that we can use it to create our own functionalities and provide it as an Add-On. Does the other kit help in developing Add-ons? Or are they supposed to be used else where.

Viktor Kovacs
Graphisoft
Graphisoft

Generally the API Development Kit serves all your needs, you only need to use the other ones if you would like to develop a specific functionality.