Create Method (Document, IList(CurveLoop), IList(XYZ), IList(Int32), IList(Int32), AreaLoadType)


Creates a new non-hosted area load within the project.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2016

Syntax

C#
public static AreaLoad Create(
	Document aDoc,
	IList<CurveLoop> loops,
	IList<XYZ> forceVectors,
	IList<int> refPointCurveIndexes,
	IList<int> refPointCurveSelectors,
	AreaLoadType symbol
)
Visual Basic
Public Shared Function Create ( _
	aDoc As Document, _
	loops As IList(Of CurveLoop), _
	forceVectors As IList(Of XYZ), _
	refPointCurveIndexes As IList(Of Integer), _
	refPointCurveSelectors As IList(Of Integer), _
	symbol As AreaLoadType _
) As AreaLoad
Visual C++
public:
static AreaLoad^ Create(
	Document^ aDoc, 
	IList<CurveLoop^>^ loops, 
	IList<XYZ^>^ forceVectors, 
	IList<int>^ refPointCurveIndexes, 
	IList<int>^ refPointCurveSelectors, 
	AreaLoadType^ symbol
)

Parameters

aDoc
Type: Autodesk.Revit.DB Document
Document to which new area load will be added.
loops
Type: System.Collections.Generic IList CurveLoop
The loops that define geometry of the area load. The curve loop collection should contains a closed loops consisting of lines.
forceVectors
Type: System.Collections.Generic IList XYZ
The array of force vectors applied to the maximum three reference point of the area load.
refPointCurveIndexes
Type: System.Collections.Generic IList Int32
The array of maximum three curve indexes on which reference points should be placed on.
refPointCurveSelectors
Type: System.Collections.Generic IList Int32
The array of maximum three curve selectors (start or end points) indicating where reference points should be placed on.
symbol
Type: Autodesk.Revit.DB.Structure AreaLoadType
The symbol of the AreaLoad. Set a null reference ( Nothing in Visual Basic) to use default type.

Return Value

If successful, returns an object of the newly created AreaLoad. a null reference ( Nothing in Visual Basic) is returned if the operation fails.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Thrown when force vector is equal zero.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException Thrown if type could not be set for newly created line load.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →