| Revit 2024 API | 
| CompoundStructure..::..SetLayers Method | 
| CompoundStructure Class See Also | 
   Completely resets this CompoundStructure and applies a new set of layers.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
 Syntax
Syntax
| C# | 
|---|
| public void SetLayers( IList<CompoundStructureLayer> layers ) | 
| Visual Basic | 
|---|
| Public Sub SetLayers ( _ layers As IList(Of CompoundStructureLayer) _ ) | 
| Visual C++ | 
|---|
| public: void SetLayers( IList<CompoundStructureLayer^>^ layers ) | 
Parameters
- layers
- Type: System.Collections.Generic..::..IList<(Of <(<'CompoundStructureLayer>)>)>
 The layers to be set.
 Remarks
Remarks
   This function will replace all existing layers with the contents of the input.  This provides a full
   reset for the CompoundStructure. Therefore:
   
- All layers will be marked as Core layers, and any settings related to Shell layers (such as GetFirstCoreLayerIndex()()()(), GetLastCoreLayerIndex()()()() or GetCoreBoundaryLayerIndex(ShellLayerType)) will be modified accordingly.
- Because all layers will be set as Core layers, the value of LayerCapFlag will be ignored (and set to true) automatically.
- The VariableLayerIndex will be unset.
- The StructuralMaterialIndex will be unset.
- The compound structure will be set to be vertically homogeneous.
 Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |