# Create Stirrups by using CreateFromCurves method

**URL:** <https://forum.dynamobim.com/t/create-stirrups-by-using-createfromcurves-method/104306>\
**Category:** Revit\
**Tags:** revit, python, dynamo\
**Created:** [September 12, 2024, 4:47pm UTC](https://forum.dynamobim.com/t/create-stirrups-by-using-createfromcurves-method/104306 "2024-09-12T16:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanywillim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hanywillim/32/155832_2.png) [@hanywillim](https://forum.dynamobim.com/u/hanywillim)\
**Post date:** [September 12, 2024, 4:47pm UTC](https://forum.dynamobim.com/t/create-stirrups-by-using-createfromcurves-method/104306/1 "2024-09-12T16:47:50Z")

</div>

Hi dynamo friends,  
I am trying to create stirrups by ungrouping a set of stirrups rebar by using this method in Revit API [CreateFromCurves](https://www.revitapidocs.com/2020/b020c9d5-6026-b9fa-7e23-f6a7ec2cede3.htm)

nd i am pretty sure that the **Bends and hooks are not included in the curve definition**

```auto
`new_rebar = Rebar.CreateFromCurves(doc, rebar_style, rebar_bar_type, start_hook, end_hook, host, rebar_direction, curves, start_hook_orien, end_hook_orien, True, False)`

```

this is the method i collect the curves :

```auto
rebar_curves = rebar.GetCenterlineCurves(False, True, True, MultiplanarOption.IncludeOnlyPlanarCurves, 0)

curves = List[Curve](curve for curve in rebar_curves)

```

Exception: An internal error has occurred.

But when i trid to do only one item in the curves the code work and give me a stirrup with one curve shape (as link stirrup)

Do i miss any thing here ?

Thanks in advance

![99](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d4955e327ec31d9fbb18d5f28578405e1327bf88.png)

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [September 16, 2024, 8:30am UTC](https://forum.dynamobim.com/t/create-stirrups-by-using-createfromcurves-method/104306/2 "2024-09-16T08:30:50Z")

</div>

Are you able to provide the full code? It’s a bit hard to review when there are no images of the graph or code to assist
