Create Method (Document, ElementId, AnalyticalElementSelector, XYZ, XYZ, PointLoadType)


Creates a new hosted point 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 PointLoad Create(
	Document document,
	ElementId hostElemId,
	AnalyticalElementSelector selector,
	XYZ forceVector,
	XYZ momentVector,
	PointLoadType symbol
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	hostElemId As ElementId, _
	selector As AnalyticalElementSelector, _
	forceVector As XYZ, _
	momentVector As XYZ, _
	symbol As PointLoadType _
) As PointLoad
Visual C++
public:
static PointLoad^ Create(
	Document^ document, 
	ElementId^ hostElemId, 
	AnalyticalElementSelector selector, 
	XYZ^ forceVector, 
	XYZ^ momentVector, 
	PointLoadType^ symbol
)

Parameters

document
Type: Autodesk.Revit.DBDocument
Document to which new point load will be added.
hostElemId
Type: Autodesk.Revit.DBElementId
The AnalyticalMember host element for the point Load.
selector
Type: Autodesk.Revit.DB.StructureAnalyticalElementSelector
The start or end point of the Analytical Member element.
forceVector
Type: Autodesk.Revit.DBXYZ
The applied 3d force vector.
momentVector
Type: Autodesk.Revit.DBXYZ
The applied 3d moment vector.
symbol
Type: Autodesk.Revit.DB.StructurePointLoadType
The symbol of the PointLoad. Set a null reference (Nothing in Visual Basic) to use default type.

Return Value

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

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The element hostElemId does not exist in the document -or- hostElemId is not permitted for this type of load.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.ExceptionsArgumentsInconsistentException Thrown when force and moment vectors are equal zero.
Autodesk.Revit.ExceptionsInvalidOperationException Thrown if type could not be set for newly created point 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 →