Revit 2018 API |
LineLoad..::..Create Method (Document, AnalyticalModelSurface, Int32, XYZ, XYZ, LineLoadType) |
LineLoad Class See Also |
Creates a new hosted line load within the project.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.13)
Since:
2016
Syntax
C# |
---|
public static LineLoad Create( Document aDoc, AnalyticalModelSurface host, int curveIndex, XYZ forceVector1, XYZ momentVector1, LineLoadType symbol ) |
Visual Basic |
---|
Public Shared Function Create ( _ aDoc As Document, _ host As AnalyticalModelSurface, _ curveIndex As Integer, _ forceVector1 As XYZ, _ momentVector1 As XYZ, _ symbol As LineLoadType _ ) As LineLoad |
Visual C++ |
---|
public: static LineLoad^ Create( Document^ aDoc, AnalyticalModelSurface^ host, int curveIndex, XYZ^ forceVector1, XYZ^ momentVector1, LineLoadType^ symbol ) |
Parameters
- aDoc
- Type: Autodesk.Revit.DB..::..Document
Document to which new line load will be added.
- host
- Type: Autodesk.Revit.DB.Structure..::..AnalyticalModelSurface
The analytical model surface host element for the line Load.
- curveIndex
- Type: System..::..Int32
The index of a curve in analytical surface element starting from 0. Use [!:Autodesk::Revit::DB::Structure::AnalyticalModelSurface::GetLoops(Autodesk::Revit::DB::Structure::AnalyticalLoopType::All)] method to obtain appropriate curve index. Curve index has a unique value in analytical surface element even if it contains more than one loop. The index should be obtain by iteration through all curves in all loops.
- forceVector1
- Type: Autodesk.Revit.DB..::..XYZ
The applied 3d force vector.
- momentVector1
- Type: Autodesk.Revit.DB..::..XYZ
The applied 3d moment vector.
- symbol
- Type: Autodesk.Revit.DB.Structure..::..LineLoadType
The symbol of the LineLoad. Set nullNothingnullptra null reference (Nothing in Visual Basic) to use default type.
Return Value
If successful, returns the newly created LineLoad, nullNothingnullptra null reference (Nothing in Visual Basic) otherwise.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The element host was not found in the given document. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..ArgumentsInconsistentException | Thrown when all force and moment vectors are equal zero. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown if type could not be set for newly created line load. |