We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

How to change Beam material in AC23?

Anonymous
Not applicable
Hello,

In AC22 API_BeamType contained attributes below:
API_OverriddenAttribute leftMat;
API_OverriddenAttribute topMat;
API_OverriddenAttribute rightMat;
API_OverriddenAttribute botMat;
API_OverriddenAttribute sideMat;

The following code was able to change the material:
ACAPI_ELEMENT_MASK_SET(elementMask, API_BeamType, leftMat);
ACAPI_ELEMENT_MASK_SET(elementMask, API_BeamType, botMat);
ACAPI_ELEMENT_MASK_SET(elementMask, API_BeamType, topMat);
ACAPI_ELEMENT_MASK_SET(elementMask, API_BeamType, sideMat);
ACAPI_ELEMENT_MASK_SET(elementMask, API_BeamType, rightMat);
OVERRIDE_MATERIAL(clickedElement.beam.leftMat, paletteController.CurrentMaterial()->index);
OVERRIDE_MATERIAL(clickedElement.beam.botMat, paletteController.CurrentMaterial()->index);
OVERRIDE_MATERIAL(clickedElement.beam.topMat, paletteController.CurrentMaterial()->index);
OVERRIDE_MATERIAL(clickedElement.beam.sideMat, paletteController.CurrentMaterial()->index);
OVERRIDE_MATERIAL(clickedElement.beam.rightMat, paletteController.CurrentMaterial()->index);


In AC23 which attributes should be changed to modify API_BeamType material?

Regards,
1 REPLY 1
Ralph Wessel
Mentor
Beams and columns become assemblies in AC23, comprised of a parent assembly (API_BeamType) and at least one child segment element (API_BeamSegmentType) and that's the level where the materials etc are stored. So you need to work with API_BeamSegmentType for this purpose rather than API_BeamType.
Ralph Wessel BArch
Software Engineer Speckle Systems