Creates a new instance of a LoadCase element within the project.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- name
- Type: System String
The not empty name for the Load Case Element to create.
- nature
- Type: Autodesk.Revit.DB.Structure LoadNature
The Load Case nature.
- category
- Type: Autodesk.Revit.DB Category
The Load Case category.
Return Value
If successful, NewLoadCase and there isn't the Load Case Element with the same name returns an object for the newly created LoadCase. If such element exist and match desired one (has the same nature and number), returns existing element. Otherwise a null reference ( Nothing in Visual Basic) is returned.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions InvalidOperationException | If the product is not Revit Structure. |
Autodesk.Revit.Exceptions ArgumentException | Thrown if the load case nature does not exist in the given document. |