Change reference of element to dimension

revit
dynamo

#1

How could I dimension with a line based element, for example ductwork or a pipe. It works for the centerline, but if I want to dimension to one edge of the element, how could I do that?.
Thanks a lot.

Issue

Note:
-Whitout creating another element becouse I will lost the reference and the dimension doesn’t update if I move the Ductwork or pipe, maybe if there is a way to restrain (lock) one line to the element with dynamo, please let me know How.