We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-11-07 12:20 PM - last edited on 2024-09-17 01:20 PM by Doreena Deng
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;
}
Solved! Go to Solution.
2023-11-07 08:07 PM
2023-11-07 08:07 PM
2023-11-08 05:57 AM
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.
2023-11-08 07:36 AM
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.
a month ago
Hi Kency!
Have you found a solution to this problem? The polygon part seems to be empty/not defined for polygonal openings. Also for AC28.
Cheers!
Petteri Heiskari/ArchiFrame