2018-07-26
12:52 PM
- last edited on
2022-12-06
01:29 PM
by
Daniel Kassai
Solved! Go to Solution.
2018-08-10 05:00 PM
API_Attribute composite;
BNZeroMemory (&composite, sizeof(API_Attribute));
composite.header.typeID = API_CompWallID;
composite.header.index = element.wall.composite;
GSErrCode err = ACAPI_Attribute_Get (&composite);
if (err == NoError) {
API_AttributeDefExt compDefs;
BNZeroMemory (&compDefs, sizeof (API_AttributeDefExt));
err = ACAPI_Attribute_GetDefExt (API_CompWallID, composite.header.index, &compDefs);
if (err == NoError) {
// enumerate the parts
for (short ii = 0; ii < composite.compWall.nComps; ++ii) {
API_CWallComponent& part = (*compDefs.cwall_compItems)[ii];
part.buildingMaterial; /**< index of the building material */
part.fillThick; /**< absolute thickness of the component in m */
}
// after you modified the thickness you can save it using ACAPI_Attribute_ModifyExt
}
ACAPI_DisposeAttrDefsHdlsExt (&compDefs);
}
If you have any further questions, feel free to ask me!2018-08-10 05:00 PM
API_Attribute composite;
BNZeroMemory (&composite, sizeof(API_Attribute));
composite.header.typeID = API_CompWallID;
composite.header.index = element.wall.composite;
GSErrCode err = ACAPI_Attribute_Get (&composite);
if (err == NoError) {
API_AttributeDefExt compDefs;
BNZeroMemory (&compDefs, sizeof (API_AttributeDefExt));
err = ACAPI_Attribute_GetDefExt (API_CompWallID, composite.header.index, &compDefs);
if (err == NoError) {
// enumerate the parts
for (short ii = 0; ii < composite.compWall.nComps; ++ii) {
API_CWallComponent& part = (*compDefs.cwall_compItems)[ii];
part.buildingMaterial; /**< index of the building material */
part.fillThick; /**< absolute thickness of the component in m */
}
// after you modified the thickness you can save it using ACAPI_Attribute_ModifyExt
}
ACAPI_DisposeAttrDefsHdlsExt (&compDefs);
}
If you have any further questions, feel free to ask me!2018-08-13 01:27 PM