Rebar auto-tag

Any help in creating a dynamo script like in this video?

The purpose is to tag all rebar in the host by:
1- showing the middle bars only.
2- tagging top and bottom bars that are in the same location with only one dimension line and dot.
3- create a tag line and dot.
4- move the tag to the edge of plan.

Is it feasible?
Thank you

Likely. What have you tried?

I was trying this, but no luck I couldn’t even make work, so I can tweak it:

I can’t seem to be able to upload screenshots!