Get Dimension of the selected SketchSegment

Hi guys does anyone knows how to get dimension of the selected segment such as line and arc because I want to change the dimension of it into driven state is that possible?

SolidworksApi macros