SetLayerWidth Method


Sets the width of a specified layer.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public void SetLayerWidth(
	int layerIdx,
	double width
)
Visual Basic
Public Sub SetLayerWidth ( _
	layerIdx As Integer, _
	width As Double _
)
Visual C++
public:
void SetLayerWidth(
	int layerIdx, 
	double width
)

Parameters

layerIdx
Type: System Int32
Index of a layer in the CompoundStructure.
width
Type: System Double
The new width of the specified layer.

Remarks

If the structure is vertically compound, and the layer is associated to a single simple region, the width of that region is adjusted. If layerIdx is 0 or LayerCount-1, and there is no associated region in the VerticalRegionsStructure, one will be created and associated to the layer. If the specified layer index is associated to a simple region, and the width is set to 0.0, that region will be deleted.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The width of the layer is not valid.
Autodesk.Revit.Exceptions ArgumentOutOfRangeException The layer index is out of range.
Autodesk.Revit.Exceptions InvalidOperationException If the region of the layer is not a simple region.

See Also