Freeform Rebar Creation from Curves



Hi all!
Inspired by Rebar.ByCurve node from DynamoRebar package, I was wondering if is it possible to create freeform rebars in a similar way.

I created a Python Script whose inputs are:

  • Rebar Bar Type;
  • Host Element;
  • IList of curves (supposed to become freeform rebars).

The script is the following:

As a result I get this:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. _
Traceback (most recent call last):
_ File “”, line 28, in

TypeError: CreateFreeForm() takes at least 2147483647 arguments (5 given)

Thanks in advance, best regards!


2147483647 arguments? Wow. What version of revit are you using? Also could you post your code?


Hi Tom,
as I was uploading a screenshot your reply appeared, thanks for that. I hope the code will clarify something.

I’m on rvt2018.2+dynamo1.3.2.


Here’s the code!

import clr
from Autodesk.DesignScript.Geometry import *
from System.Collections.Generic import IList

from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import RebarBarType, RebarFreeFormValidationResult

from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

X = clr.StrongBoxStructure.RebarFreeFormValidationResult

barType = UnwrapElement(IN[0])
host = UnwrapElement(IN[1])
curves = UnwrapElement(IN[2])

#Start Transaction

rebar_list = []
rebar = Structure.Rebar.CreateFreeForm.Overloads[Document, RebarBarType, Element, IList[IList[Curve]], RebarFreeFormValidationResult](doc, barType, host, curves, X)

#End Transaction

OUT = rebar_list


Hey there! Any ideas, anyone? :slight_smile:


Sorry I had a quick go but didn’t manage to figure it out, I’ll keep working on it


Thanks a lot!


Hello there! Has anyone any ideas?