BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

Is it possible to create a profile column wall with api c++?

LeeJaeYoung
Virtuoso

Is it possible to create a profile column wall with api c++?
If possible, which sample file should I study?
You told me that wall composite files are possible.
So, I'm curious about whether a wall column beam profile is possible, so I'm asking.
If possible, I would appreciate it if you could let me know what part I need to study.

AC27 on window 11
4 REPLIES 4
Viktor Kovacs
Graphisoft
Graphisoft

Here is a full example of creating a composite wall:

ACAPI_CallUndoableCommand (undoStepName, [&]() -> GSErrCode {
    // Get the default settings of the Wall element. Every parameter you doesn't specify
    // will come from the default element.
    API_Element element = {};
    element.header.type = API_ElemType (API_WallID);
    if (ACAPI_Element_GetDefaults (&element, nullptr) != NoError) {
        return Error;
    }

    // Set the Wall to be Composite type, and set the Composite index you would like
    // the Wall to have. The Composite index must be determined by your own logic.
    element.wall.modelElemStructureType = API_CompositeStructure;
    element.wall.composite = compositeIndex;

    // Set the begin and end point of the Wall's geometry.
    element.wall.begC = { 0.0, 0.0 };
    element.wall.endC = { 1.0, 0.0 };

    // Create the element.
    if (ACAPI_Element_Create (&element, nullptr) != NoError) {
        return Error;
    }

    return NoError;
});

.To create a profiled one, change these lines.

        element.wall.modelElemStructureType = API_ProfileStructure;
        element.wall.composite = profileIndex;

 

thank you ^^
sorry.
I've been asking to make a STYLE.

LeeJaeYoung_0-1691496726448.png

 

AC27 on window 11
Viktor Kovacs
Graphisoft
Graphisoft

Ok, I see, you would like to create a Profile Attribute. It's a bit more tricky, please check the Attribute_Test example Add-On, and see the Do_CreateProfile function for an example.

thank you
After studying, I will ask you another question. ^^

AC27 on window 11
Learn and get certified!