How to draw rebar using python script in dynamo?

I have been trying to place rebar for a beam using dynamo python script but there is a error and is as follows

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 72, in
Exception: A managed exception was thrown by Revit or by one of its external applications.

I have attached the dynamo script here. Kindly, help me out

beam rebar.dyn (22.3 KB)

try this

1 Like