GetPreviousNonZeroLayerIndex Method


Returns the index of the nearest non-zero width layer before this layer.

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

Syntax

C#
public int GetPreviousNonZeroLayerIndex(
	int thisIdx
)
Visual Basic
Public Function GetPreviousNonZeroLayerIndex ( _
	thisIdx As Integer _
) As Integer
Visual C++
public:
int GetPreviousNonZeroLayerIndex(
	int thisIdx
)

Parameters

thisIdx
Type: SystemInt32
The layer from which to look for a non-zero width layer.

Return Value

The index of the layer found.

Remarks

If this layer is non-zero width, it will be returned. If there are non-zero width layers found, returns -1.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →