Dimensioning Rebar in current view

I have a bunch of Generic Model elements with modeled rebar & I’m hoping to speed up the process of dimensioning it. From what I can see, in order for Revit to use the equality formula within dimensions, each bar has to be dimensioned to. Some of my layouts have 40-50 bars per set.

Came across these two posts & I found the associated script, however I’m having some issues getting it to work properly. When I select the Generic Model + 1 placement of rebar, I get a traceback error. Any tips/suggestions?
2022-08-24 09_13_52-Dynamo

Automatic dim rebar in view
Why rebar dimensions crooked with python script?
Auto-dimension-for-rebars.dyn (8.1 KB)

  • Edit -
    Upon further looking, it looks like the “dimension” gets placed with text. Is there anyway to automate it while having it be true dimensions?