how do you create a line in Draw with an exact length, eg 20 metres

The details given in the line functions pane at the right are confusing and often default to a reference point. I want to click the screen and draw a line of a certain length.

Create the line its the approximate position with any length. It is now selected (handles at both ends).
If the line already exists, click on it to select.

Format>Position & Size allows you to set very precisely all parameters.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Of course, there is a maximum size in width as well as in height. The values are stored in a com.sun.star.awt.Size structure which has two Long fields for the measures expressed in units of 1/100 mm. The values, however, are only interpreted up to actual maxima depending on the current page size in a way unclear to me (less than 1.5 times anyway). Since page dimensions also are limited (to 3.00m both directions) the actual maximum length of a line is far less than 20 m.