Rebar Matching

Hello,

I have been using Revit to rebar for a while now and 1 of the main problems I always come across is that some of the rebars are the same dimension but have different bar marks and I have to manually change the schedule numbers to match the bars (See the image below)

Can a script be made to identify all the bars that have the same dimensions and automatically match the schedule number (bar mark)

You can refer this method from the link below that he sorted all the same rebar length to the same rebar number.
http://blogs.autodesk.com/bim-and-beam/2017/08/21/how-to-manage-rebar-numbering-with-dynamo/

Hope it works for you.

It doesnt show where I can get the “partition” & “getrebarsfrompartition” nodes from. I have tried searching everywhere.

I have recreated the script but the “Renumbering” Python script is giving me an error and I am not sure why

Renumber Rebar By Length.dyn (9.2 KB)

The error is saying:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. _
Traceback (most recent call last):
_ File “”, line 19, in

NameError: name ‘number’ is not defined

can anybody help ?