Creates a new level.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
| Visual Basic |
|---|
<ObsoleteAttribute("This method is deprecated in Revit 2016. Use Level.Create() instead.")> _
Public Function NewLevel ( _
elevation As Double _
) As Level |
| Visual C++ |
|---|
[ObsoleteAttribute(L"This method is deprecated in Revit 2016. Use Level.Create() instead.")]
public:
Level^ NewLevel(
double elevation
) |
Return Value
The newly created level.
Remarks
Examples
CopyC#
Level CreateLevel(Autodesk.Revit.DB.Document document)
{
double elevation = 20.0;
Level level = Level.Create(document, elevation);
if (null == level)
{
throw new Exception("Create a new level failed.");
}
level.Name = "New level";
return level;
}
CopyVB.NET
Private Function CreateLevel(document As Autodesk.Revit.DB.Document) As Level
Dim elevation As Double = 20.0
Dim level As Level = level.Create(document, elevation)
If level Is Nothing Then
Throw New Exception("Create a new level failed.")
End If
level.Name = "New level"
Return level
End Function
See Also