Create Method (Document, ElementId, Curve, XYZ, XYZ, LineLoadType)


Creates a new custom line load within the project.

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

Syntax

C#
public static LineLoad Create(
	Document document,
	ElementId hostElemId,
	Curve curve,
	XYZ forceVector1,
	XYZ momentVector1,
	LineLoadType symbol
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	hostElemId As ElementId, _
	curve As Curve, _
	forceVector1 As XYZ, _
	momentVector1 As XYZ, _
	symbol As LineLoadType _
) As LineLoad
Visual C++
public:
static LineLoad^ Create(
	Document^ document, 
	ElementId^ hostElemId, 
	Curve^ curve, 
	XYZ^ forceVector1, 
	XYZ^ momentVector1, 
	LineLoadType^ symbol
)

Parameters

document
Type: Autodesk.Revit.DBDocument
Document to which new line load will be added.
hostElemId
Type: Autodesk.Revit.DBElementId
The analytical host element for the line Load.
curve
Type: Autodesk.Revit.DBCurve
Curve of the line load.
forceVector1
Type: Autodesk.Revit.DBXYZ
The applied 3d force vector.
momentVector1
Type: Autodesk.Revit.DBXYZ
The applied 3d moment vector.
symbol
Type: Autodesk.Revit.DB.StructureLineLoadType
The symbol of the LineLoad. Set a null reference (Nothing in Visual Basic) to use default type.

Return Value

If successful, returns the newly created LineLoad, a null reference (Nothing in Visual Basic) otherwise.

Remarks

The curve must be bounded. The curve can be:
  • Line
  • Arc
  • Ellipse

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- The provided curve is not supported. -or- The input curve is not bound.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentsInconsistentException Thrown when all force and moment vectors are equal zero.
Autodesk.Revit.ExceptionsInvalidOperationException Thrown if type could not be set for newly created line load.

See Also