NewLoadCombination Method
Creates a new instance of a LoadCombination element within the project.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)

Syntax

C#
[ObsoleteAttribute("This method is obsolete in Revit 2016. Use LoadCombination.Create() instead.")]
public LoadCombination NewLoadCombination(
	string name,
	int typeInd,
	int stateInd,
	double[] factors,
	LoadCaseArray cases,
	LoadCombinationArray combinations,
	LoadUsageArray usages
)
Visual Basic
<ObsoleteAttribute("This method is obsolete in Revit 2016. Use LoadCombination.Create() instead.")> _
Public Function NewLoadCombination ( _
	name As String, _
	typeInd As Integer, _
	stateInd As Integer, _
	factors As Double(), _
	cases As LoadCaseArray, _
	combinations As LoadCombinationArray, _
	usages As LoadUsageArray _
) As LoadCombination
Visual C++
[ObsoleteAttribute(L"This method is obsolete in Revit 2016. Use LoadCombination.Create() instead.")]
public:
LoadCombination^ NewLoadCombination(
	String^ name, 
	int typeInd, 
	int stateInd, 
	array<double>^ factors, 
	LoadCaseArray^ cases, 
	LoadCombinationArray^ combinations, 
	LoadUsageArray^ usages
)

Parameters

name
Type: System..::..String
The not empty name for the Load Combination Element to create.
typeInd
Type: System..::..Int32
LoadCombination Type Index: 0-Combination, 1-Envelope.
stateInd
Type: System..::..Int32
LoadCombination State Index: 0-Servicebility, 1-Ultimate.
factors
Type: array<System..::..Double>[]()[][]
Factors array for Load Combination formula.
cases
Type: Autodesk.Revit.DB.Structure..::..LoadCaseArray
Load Cases array for Load Combination formula.
combinations
Type: Autodesk.Revit.DB.Structure..::..LoadCombinationArray
Load Combinations array for Load Combination formula.
usages
Type: Autodesk.Revit.DB.Structure..::..LoadUsageArray
Load Usages array.

Return Value

If successful, NewLoadCombination and there isn't the Load Combination Element with the same name returns an object for the newly created LoadCombination. If such element exist and match desired one (has the same formula and the same usages set), returns existing element. Otherwise nullNothingnullptra null reference (Nothing in Visual Basic) is returned.

Remarks

Factors and Load Combinations arrays have the same dimension (n). The Load Combination formula is equal to: factors[0]*cases[0]*factors[1]*cases[1]*. . . factors[n]*cases[n].

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..InvalidOperationExceptionIf the product is not Revit Structure.

See Also