Revit Preview Release API |
RebarCoupler..::..Create Method |
RebarCoupler Class See Also |
Creates a new instance of a Rebar Coupler element within the project.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)
Since:
2017
Syntax
C# |
---|
public static RebarCoupler Create( Document doc, ElementId typeId, ReinforcementData pFirstData, ReinforcementData pSecondData, out RebarCouplerError error ) |
Visual Basic |
---|
Public Shared Function Create ( _ doc As Document, _ typeId As ElementId, _ pFirstData As ReinforcementData, _ pSecondData As ReinforcementData, _ <OutAttribute> ByRef error As RebarCouplerError _ ) As RebarCoupler |
Visual C++ |
---|
public: static RebarCoupler^ Create( Document^ doc, ElementId^ typeId, ReinforcementData^ pFirstData, ReinforcementData^ pSecondData, [OutAttribute] RebarCouplerError% error ) |
Parameters
- doc
- Type: Autodesk.Revit.DB..::..Document
A document.
- typeId
- Type: Autodesk.Revit.DB..::..ElementId
type id for coupler
- pFirstData
- Type: Autodesk.Revit.DB.Structure..::..ReinforcementData
information about the first reinforcement to be coupled
- pSecondData
- Type: Autodesk.Revit.DB.Structure..::..ReinforcementData
information about the second reinforcement to be coupled; if a nullptr is passed in the coupler is placed on one reinforcement
- error
- Type: Autodesk.Revit.DB.Structure..::..RebarCouplerError%
will be ValidationSuccesfully(0) if ok, otherwise the failure reason
Return Value
The newly created Rebar Coupler instance, or nullNothingnullptra null reference (Nothing in Visual Basic) if the operation fails.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |