Sets a single layer for this CompoundStructure.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- layerIdx
- Type: SystemInt32
The index of a layer. This should range from 0 to the number of layers - 1.
- layer
- Type: Autodesk.Revit.DBCompoundStructureLayer
The layer to be set.
Remarks
This function does not support addition of new layers, use SetLayers() to change the number of layers.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The layer is not valid for this operation. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsArgumentOutOfRangeException | The layer index is out of range. |
Autodesk.Revit.ExceptionsInvalidOperationException | This operation is valid only for non-vertically compound structures. |