Create Method (Document, XYZ, XYZ, XYZ, PointLoadType, SketchPlane)


Creates a new non-hosted point load within the project using data at point.

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 PointLoad Create(
	Document aDoc,
	XYZ point,
	XYZ forceVector,
	XYZ momentVector,
	PointLoadType symbol,
	SketchPlane plane
)
Visual Basic
Public Shared Function Create ( _
	aDoc As Document, _
	point As XYZ, _
	forceVector As XYZ, _
	momentVector As XYZ, _
	symbol As PointLoadType, _
	plane As SketchPlane _
) As PointLoad
Visual C++
public:
static PointLoad^ Create(
	Document^ aDoc, 
	XYZ^ point, 
	XYZ^ forceVector, 
	XYZ^ momentVector, 
	PointLoadType^ symbol, 
	SketchPlane^ plane
)

Parameters

aDoc
Type: Autodesk.Revit.DB Document
Document to which new point load will be added.
point
Type: Autodesk.Revit.DB XYZ
The position of point load, measured in decimal feet.
forceVector
Type: Autodesk.Revit.DB XYZ
The applied 3d force vector.
momentVector
Type: Autodesk.Revit.DB XYZ
The applied 3d moment vector.
symbol
Type: Autodesk.Revit.DB.Structure PointLoadType
The symbol of the PointLoad. Set a null reference ( Nothing in Visual Basic) to use default type.
plane
Type: Autodesk.Revit.DB SketchPlane
The work plane of the PointLoad. Set a null reference ( Nothing in Visual Basic) to use default plane.

Return Value

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

Examples

Copy C#
public PointLoad CreatePointLoad(Autodesk.Revit.DB.Document document)
{
   //Define the location at which the PointLoad is applied. 
    XYZ point = new XYZ(0, 0, 4);
    //Define the 3d force vector. 
    XYZ force = new XYZ(0, 0, -1);
    //Define the 3d moment vector. 
    XYZ moment = new XYZ(0, 0, 0);

    PointLoad pointLoad = PointLoad.Create(document, point, force, moment, null, null);

    return pointLoad;
}
Copy VB.NET
'Define the location at which the PointLoad is applied. 
Dim point As New XYZ(0, 0, 4)
'Define the 3d force. 
Dim force As New XYZ(0, 0, -1)
'Define the 3d moment. 
Dim moment As New XYZ(0, 0, 0)

Dim pointLoad As PointLoad = pointLoad.Create(document, point, force, moment, Nothing, Nothing)

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Thrown when work plane is not valid.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentsInconsistentException Thrown when force and moment vectors are equal zero.
Autodesk.Revit.Exceptions InvalidOperationException Thrown if type could not be set for newly created point load.

See Also