CreateFromCurves
Version comparisonPer-version detail
Click a version below to see what changed in that release vs your current frame (2021).
Not present in: 2020, 2027
2021
current
Rebar.CreateFromCurves(Document, RebarStyle, RebarBarType, RebarHookType, RebarHookType, Element, XYZ, IList<Curve>, RebarHookOrientation, RebarHookOrientation, Double, Double, ElementId, ElementId, Boolean, Boolean)
| doc | Document | A document. |
| style | RebarStyle | The usage of the bar, "standard" or "stirrup/tie". |
| barType | RebarBarType | A RebarBarType element that defines bar diameter, bend radius and material of the rebar. |
| startHook | RebarHookType | A RebarHookType element that defines the hook for the start of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| endHook | RebarHookType | A RebarHookType element that defines the hook for the end of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| host | Element | The element to which the rebar belongs. The element must support rebar hosting; <span class="nolink">[!:Autodesk::Revit::DB::Structure::RebarHostData]</span>. |
| norm | XYZ | The normal to the plane that the rebar curves lie on. |
| curves | IList<Curve> | An array of curves that define the shape of the rebar curves. They must belong to the plane defined by the normal and origin. Bends and hooks should not be included in the array of curves. |
| startHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the start of the rebar with respect to the orientation of the first curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| endHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the end of the rebar with respect to the orientation of the last curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| hookRotationAngleAtStart | Double | The out of plane hook rotation angle at the start of the bar. |
| hookRotationAngleAtEnd | Double | The out of plane hook rotation angle at the end of the bar. |
| endTreatmentTypeIdAtStart | ElementId | The end treatment type id at the start of the bar. |
| endTreatmentTypeIdAtEnd | ElementId | The end treatment type id at the end of the bar. |
| useExistingShapeIfPossible | Boolean | Attempts to assign a RebarShape from those existing in the document. If no shape matches, this function returns <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span> if createNewShape is false or it will create a new shape if createNewShape is true. When both parameters are "true", the behavior is the same as sketching rebar in the UI. At least one of these parameters must be "true". If the RebarShapeDefinesHooks flag in ReinforcementSettings has been set to false, and a RebarShape cannot be found with both matching curves and hooks, then this method will perform a second search, ignoring hook information. |
| createNewShape | Boolean | Creates a shape in the document to match the curves, hooks, and style specified, and assigns it to the new rebar instance. Shape creation will not succeed unless one or more other shapes already exist in the document, and these shapes have enough shape parameters to define a shape for these curves. |
| → returns | Rebar→nullNothingnullptr | The newly created Rebar instance, or null Nothing nullptr a null reference ( Nothing in Visual Basic) if the operation fails. |
Rebar.CreateFromCurves(Document, RebarStyle, RebarBarType, RebarHookType, RebarHookType, Element, XYZ, IList<Curve>, RebarHookOrientation, RebarHookOrientation, Double, Double, ElementId, ElementId, Boolean, Boolean)
| doc | Document | A document. |
| style | RebarStyle | The usage of the bar, "standard" or "stirrup/tie". |
| barType | RebarBarType | A RebarBarType element that defines bar diameter, bend radius and material of the rebar. |
| startHook | RebarHookType | A RebarHookType element that defines the hook for the start of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| endHook | RebarHookType | A RebarHookType element that defines the hook for the end of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| host | Element | The element to which the rebar belongs. The element must support rebar hosting; <span class="nolink">[!:Autodesk::Revit::DB::Structure::RebarHostData]</span>. |
| norm | XYZ | The normal to the plane that the rebar curves lie on. |
| curves | IList<Curve> | An array of curves that define the shape of the rebar curves. They must belong to the plane defined by the normal and origin. Bends and hooks should not be included in the array of curves. |
| startHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the start of the rebar with respect to the orientation of the first curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| endHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the end of the rebar with respect to the orientation of the last curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| hookRotationAngleAtStart | Double | The out of plane hook rotation angle at the start of the bar. |
| hookRotationAngleAtEnd | Double | The out of plane hook rotation angle at the end of the bar. |
| endTreatmentTypeIdAtStart | ElementId | The end treatment type id at the start of the bar. |
| endTreatmentTypeIdAtEnd | ElementId | The end treatment type id at the end of the bar. |
| useExistingShapeIfPossible | Boolean | Attempts to assign a RebarShape from those existing in the document. If no shape matches, this function returns <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span> if createNewShape is false or it will create a new shape if createNewShape is true. When both parameters are "true", the behavior is the same as sketching rebar in the UI. At least one of these parameters must be "true". If the RebarShapeDefinesHooks flag in ReinforcementSettings has been set to false, and a RebarShape cannot be found with both matching curves and hooks, then this method will perform a second search, ignoring hook information. |
| createNewShape | Boolean | Creates a shape in the document to match the curves, hooks, and style specified, and assigns it to the new rebar instance. Shape creation will not succeed unless one or more other shapes already exist in the document, and these shapes have enough shape parameters to define a shape for these curves. |
| → returns | Rebar→nullNothingnullptr | The newly created Rebar instance, or null Nothing nullptr a null reference ( Nothing in Visual Basic) if the operation fails. |
Rebar.CreateFromCurves(Document, RebarStyle, RebarBarType, RebarHookType, RebarHookType, Element, XYZ, IList<Curve>, RebarHookOrientation, RebarHookOrientation, Double, Double, ElementId, ElementId, Boolean, Boolean, Double, Double)
No longer obsolete in 2021 (was obsolete in 2026)
| doc | Document | A document. |
| style | RebarStyle | The usage of the bar, "standard" or "stirrup/tie". |
| barType | RebarBarType | A RebarBarType element that defines bar diameter, bend radius and material of the rebar. |
| startHook | RebarHookType | A RebarHookType element that defines the hook for the start of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| endHook | RebarHookType | A RebarHookType element that defines the hook for the end of the bar. If this parameter is <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span>, it means to create a rebar with no hook. |
| host | Element | The element to which the rebar belongs. The element must support rebar hosting; <span class="nolink">[!:Autodesk::Revit::DB::Structure::RebarHostData]</span>. |
| norm | XYZ | The normal to the plane that the rebar curves lie on. |
| curves | IList<Curve> | An array of curves that define the shape of the rebar curves. They must belong to the plane defined by the normal and origin. Bends and hooks should not be included in the array of curves. |
| startHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the start of the rebar with respect to the orientation of the first curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| endHookOrient | RebarHookOrientation | Defines the orientation of the hook plane at the end of the rebar with respect to the orientation of the last curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." |
| hookRotationAngleAtStart | Double | The out of plane hook rotation angle at the start of the bar. |
| hookRotationAngleAtEnd | Double | The out of plane hook rotation angle at the end of the bar. |
| endTreatmentTypeIdAtStart | ElementId | The end treatment type id at the start of the bar. |
| endTreatmentTypeIdAtEnd | ElementId | The end treatment type id at the end of the bar. |
| useExistingShapeIfPossible | Boolean | Attempts to assign a RebarShape from those existing in the document. If no shape matches, this function returns <span class="keyword">null</span><span class="nu">a null reference (<span class="keyword">Nothing</span> in Visual Basic)</span> if createNewShape is false or it will create a new shape if createNewShape is true. When both parameters are "true", the behavior is the same as sketching rebar in the UI. At least one of these parameters must be "true". If the RebarShapeDefinesHooks flag in ReinforcementSettings has been set to false, and a RebarShape cannot be found with both matching curves and hooks, then this method will perform a second search, ignoring hook information. |
| createNewShape | Boolean | Creates a shape in the document to match the curves, hooks, and style specified, and assigns it to the new rebar instance. Shape creation will not succeed unless one or more other shapes already exist in the document, and these shapes have enough shape parameters to define a shape for these curves. |
| terminationRotationAngleAtStart | Double | |
| terminationRotationAngleAtEnd | Double | |
| → returns | Rebar→nullNothingnullptr | The newly created Rebar instance, or null Nothing nullptr a null reference ( Nothing in Visual Basic) if the operation fails. |