LoadCase.Create(Document, String, ElementId, LoadCaseCategory) Method

LoadCaseCreate(Document, String, ElementId, LoadCaseCategory) Method

Creates a new LoadCase.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static LoadCase Create(
	Document document,
	string name,
	ElementId natureId,
	LoadCaseCategory loadCaseCategory
)
Public Shared Function Create ( 
	document As Document,
	name As String,
	natureId As ElementId,
	loadCaseCategory As LoadCaseCategory
) As LoadCase
public:
static LoadCase^ Create(
	Document^ document, 
	String^ name, 
	ElementId^ natureId, 
	LoadCaseCategory loadCaseCategory
)
static member Create : 
        document : Document * 
        name : string * 
        natureId : ElementId * 
        loadCaseCategory : LoadCaseCategory -> LoadCase 

Parameters

document  Document
The Document to which new load case element will be added.
name  String
The name of the load case.
natureId  ElementId
The load nature ID.
loadCaseCategory  LoadCaseCategory
The predefined load case category.

Return Value

LoadCase
The newly created load case element if successful, otherwise.
Exceptions
ExceptionCondition
ArgumentException The given name is not unique.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Remarks
This method is designed to create LoadCase that is associated with one of the predefined category.
See Also