Create Method (Document, String, ElementId, ElementId)


Creates a new LoadCase.

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

Syntax

C#
public static LoadCase Create(
	Document document,
	string name,
	ElementId natureId,
	ElementId subcategoryId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	name As String, _
	natureId As ElementId, _
	subcategoryId As ElementId _
) As LoadCase
Visual C++
public:
static LoadCase^ Create(
	Document^ document, 
	String^ name, 
	ElementId^ natureId, 
	ElementId^ subcategoryId
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The Document to which new load case element will be added.
name
Type: SystemString
The name of the load case.
natureId
Type: Autodesk.Revit.DBElementId
The load nature ID.
subcategoryId
Type: Autodesk.Revit.DBElementId
The load case subcategory ID. Could be one of predefined or user defined load case category. Built-in structural Load Cases (OST_LoadCases) subcategories are: OST_LoadCasesDeadOST_LoadCasesLiveOST_LoadCasesWindOST_LoadCasesSnowOST_LoadCasesRoofLiveOST_LoadCasesAccidentalOST_LoadCasesTemperatureOST_LoadCasesSeismic

Return Value

The newly created load case element if successful, a null reference (Nothing in Visual Basic) otherwise.

Remarks

This method is designed to create LoadCase that is associated with user defined category.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The given name is not unique.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also