Creates a new non-hosted point load within the project using data at point.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
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 nullNothingnullptra null reference (Nothing in Visual Basic) to use default type.
- plane
- Type: Autodesk.Revit.DB..::..SketchPlane
The work plane of the PointLoad. Set nullNothingnullptra null reference (Nothing in Visual Basic) to use default plane.
Return Value
If successful, returns the newly created PointLoad, nullNothingnullptra null reference (Nothing in Visual Basic) otherwise.
Examples

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; }

Public Function CreatePointLoad(document As Autodesk.Revit.DB.Document) As PointLoad 'Define the location at which the PointLoad is applied. Dim point As New XYZ(0, 0, 4) 'Define the 3d force vector. Dim force As New XYZ(0, 0, -1) 'Define the 3d moment vector. Dim moment As New XYZ(0, 0, 0) Dim pointLoad__1 As PointLoad = PointLoad.Create(document, point, force, moment, Nothing, Nothing) Return pointLoad__1 End Function
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. |