cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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!