I'm working with the ArchiCAD C++ API and can apply materials to an entire stair, but I'm stuck on how to apply different materials to just the threads and risers. Does anyone know how to do this?
This is my current code to apply the materials to the structure
API_OverriddenAttribute attr = GetOverriddenAttribute(GetAttributeIndex(strdup(surfaceMaterial.c_str()), API_MaterialID));
element.stair.structure[0][2].data.monolith.topMaterial = attr;
element.stair.structure[0][2].data.monolith.rightMaterial = attr;
element.stair.structure[0][2].data.monolith.leftMaterial = attr;
element.stair.structure[0][2].data.monolith.bottomMaterial = attr;
element.stair.structure[1][2].data.monolith.topMaterial = attr;
element.stair.structure[1][2].data.monolith.rightMaterial = attr;
element.stair.structure[1][2].data.monolith.leftMaterial = attr;
element.stair.structure[1][2].data.monolith.bottomMaterial = attr;
element.stair.structure[1][2].data.monolith.materialsChained = false;
element.stair.structure[0][2].data.monolith.materialsChained = false;