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

Applying Materials to Stair Threads and Risers

sijocherian
Contributor

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;

 

 

0 REPLIES 0

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!