2023-11-10 07:47 AM - 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;
}