Creates a new custom area load within the project.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2024
Syntax
C# |
---|
public static AreaLoad Create( Document document, ElementId hostElemId, IList<CurveLoop> loops, XYZ forceVector, AreaLoadType symbol ) |
Visual Basic |
---|
Public Shared Function Create ( _ document As Document, _ hostElemId As ElementId, _ loops As IList(Of CurveLoop), _ forceVector As XYZ, _ symbol As AreaLoadType _ ) As AreaLoad |
Visual C++ |
---|
public: static AreaLoad^ Create( Document^ document, ElementId^ hostElemId, IList<CurveLoop^>^ loops, XYZ^ forceVector, AreaLoadType^ symbol ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
Document to which new area load will be added.
- hostElemId
- Type: Autodesk.Revit.DB..::..ElementId
The analytical surface host element id for the area Load.
- loops
- Type: System.Collections.Generic..::..IList<(Of <(<'CurveLoop>)>)>
The loops that define geometry of the area load. The curve loop collection should contains a closed loops consisting of lines.
- forceVector
- Type: Autodesk.Revit.DB..::..XYZ
The force vector applied to the 1st reference point of the area load.
- symbol
- Type: Autodesk.Revit.DB.Structure..::..AreaLoadType
The symbol of the AreaLoad. Set nullNothingnullptra null reference (Nothing in Visual Basic) to use default type.
Return Value
If successful, returns an object of the newly created AreaLoad. nullNothingnullptra null reference (Nothing in Visual Basic) is returned if the operation fails.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | hostElemId is not permitted for this type of load. -or- One of the following requirements is not satisfied : - curve loops loops are not planar - curve loops loops are self-intersecting - curve loops loops contains zero length curves |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..ArgumentsInconsistentException | Thrown if the host element id is a Curved Panel. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown if type could not be set for newly created area load. |