Sketch a rectangle and add an offset line to it at a distance of 5 mm (A). The Offset function will automatically add the Distance constraint between the lines and the Equal Distance constraint between other lines.
Select the Automatic constraints function. In the dialog box, select Constrain all and automatic dimensioning: Distance (B). Select OK. The dimensions added automatically will be highlighted in a different color from the dimensions that have been added manually by selecting the elements. The Distance constraint will be displayed in the part's feature tree.
If necessary, you can move the dimensions in the sketch (C).