(Pyton or C#) component. How to get Dim.Text from dims in rhino layout?

How to get in gh a component with a text output about DimensionText property from multiple dimensions (linear, angle, diameter) in a rhino layout. Any pyton or c# script solution?