LevelGetNearestLevelId(Document, Double, Double) Method |
Returns id of the Level which is closest to the specified elevation.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static ElementId GetNearestLevelId(
Document document,
double elevation,
out double offset
)
Public Shared Function GetNearestLevelId (
document As Document,
elevation As Double,
<OutAttribute> ByRef offset As Double
) As ElementId
public:
static ElementId^ GetNearestLevelId(
Document^ document,
double elevation,
[OutAttribute] double% offset
)
static member GetNearestLevelId :
document : Document *
elevation : float *
offset : float byref -> ElementId
Parameters
- document Document
-
The document.
- elevation Double
-
Target Elevation.
- offset Double
-
Vertical offset from the level to the target elevation.
Return Value
ElementId
Exceptions
Remarks
The level can be at, above or below the target elevation.
If there is more than one Level at the same distance from the elevation, the Level with the lowest Id will be returned.
See Also