Place dimensions in lines

Good day, I want to create dimensions between lines, like the image, but I do not have the idea of how to do it, any recommendation.