Create Stirrups by using CreateFromCurves method

Hi dynamo friends,
I am trying to create stirrups by ungrouping a set of stirrups rebar by using this method in Revit API CreateFromCurves

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

`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 :

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

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