Create Method (Document, AnalyticalModelSurface, XYZ, AreaLoadType)


Creates a new hosted area load within the project.

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

Syntax

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

Parameters

aDoc
Type: Autodesk.Revit.DB Document
Document to which new area load will be added.
host
Type: Autodesk.Revit.DB.Structure AnalyticalModelSurface
The analytical surface host element (Analytical Floor, Analytical Foundation Slab or Analytical Wall) for the area Load.
forceVector
Type: Autodesk.Revit.DB XYZ
The force vector applied to the 1st reference point of the area load.
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 The element host was not found in the given document. -or- 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