InsertLayer
bool InsertLayer(this CompoundStructure cs, int index, double thickness, MaterialFunctionAssignment function, ElementId materialId)Inserts a layer at a specific index (remember to reassign back to the type).
Parameters
- csCompoundStructure
The compound structure.
- indexint
Insertion index (clamped).
- thicknessdouble
Layer thickness in feet.
- functionMaterialFunctionAssignment
Layer function.
- materialIdElementId
Material id (or InvalidElementId).
Returns: True if successful; otherwise false.
Example
cs.InsertLayer(1, 0.1, MaterialFunctionAssignment.Substrate, mat.Id);