Create Method (Document, ElementId, XYZ, AreaLoadType)


Creates a new hosted area load within the project.

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

Syntax

C#
public static AreaLoad Create(
	Document document,
	ElementId hostElemId,
	XYZ forceVector,
	AreaLoadType symbol
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	hostElemId As ElementId, _
	forceVector As XYZ, _
	symbol As AreaLoadType _
) As AreaLoad
Visual C++
public:
static AreaLoad^ Create(
	Document^ document, 
	ElementId^ hostElemId, 
	XYZ^ forceVector, 
	AreaLoadType^ symbol
)

Parameters

document
Type: Autodesk.Revit.DBDocument
Document to which new area load will be added.
hostElemId
Type: Autodesk.Revit.DBElementId
The analytical surface host element id for the area Load.
forceVector
Type: Autodesk.Revit.DBXYZ
The force vector applied to the 1st reference point of the area load.
symbol
Type: Autodesk.Revit.DB.StructureAreaLoadType
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

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The element hostElemId does not exist in the document -or- hostElemId is not permitted for this type of load. -or- Thrown when force vector is equal zero.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Thrown if type could not be set for newly created area 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 →