2 .. |length.icon| image:: images/length.png
7 Length constraint fixes the length of lines, such as standalone line or rectangle side.
9 To create a Length constraint in the active Sketch:
11 #. select in the Main Menu *Sketch - > Length* item or
12 #. click |length.icon| **Length** button in Sketch toolbar:
16 .. image:: images/Length_panel.png
21 - **Line** is the the line object selected in the view;
22 - **Value** is a line length, can be modified to set the desirable value;
23 - **Text location** is a position of the length value label relating to extension line (in the view):
24 .. image:: images/location_left.png
26 **Left** inserts text to the left of the length extension line;
28 .. image:: images/location_automatic.png
30 **Automatic** inserts text in the middle of the length extension line if it has enough length, otherwise - to the left;
32 .. image:: images/location_right.png
34 **Right** inserts text to the right of the length extension line.
36 When the line is selected, the length value is displayed in the property panel and in the view.
38 When creating the constraint, after selection of a line for the first time:
40 - drag the length presentation in the view to the desired position and click once;
41 - set desirable length value in the input field in the view and press **Enter** or just press **Enter** to keep the current length.
43 .. image:: images/Length_field_view.png
47 Length input in the view
51 .. py:function:: Sketch_1.setLength(LineObject, Value)
53 :param object: A line.
54 :param real: Length value.
55 :return: Result object.
60 Created Length appears in the view.
62 .. image:: images/Length_res.png
68 **See Also** a sample TUI Script of :ref:`tui_create_length` operation.