Creates a new instance of a LoadNature element within the project.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
Return Value
If successful and there isn't the Load Nature Element with the
same name NewLoadNature returns an object for the newly created LoadNature.
If such element exist it returns existing element.
nullNothingnullptra null reference (Nothing in Visual Basic) is returned if the operation fails.
Examples
CopyC#
LoadNature nature = document.Create.NewLoadNature("New Nature");
if (null == nature)
{
throw new Exception("Create a new load nature failed.");
}
CopyVB.NET
Dim nature As LoadNature = document.Create.NewLoadNature("New Nature")
If nature Is Nothing Then
Throw New Exception("Create a new load nature failed.")
End If
Exceptions
See Also