Draft Label

Description
The Draft Label command inserts a multi-line textbox with a 2-segment leader line and an arrow. If an object or a sub-element (face, edge or vertex) is selected when starting the command, the Label can be made to display a certain attribute of the selected element, including position, length, area, volume, or material.

To insert a text element without an arrow use the Draft Text command.



Usage

 * 1) There are several ways to invoke the command:
 * 2) * Press the button.
 * 3) * Select the option from the menu.
 * 4) * Use the keyboard shortcut: then.
 * 5) Click the first point in the 3D view, or type coordinates and press the  button. This point indicates the target (arrow head). This can be anywhere, it doesn't have to be an element.
 * 6) Click the second point in the 3D view, or type coordinates and press the  button. This point indicates the start of a horizontal or vertical leader.
 * 7) Click the third point in the 3D view, or type coordinates and press the  button. This point indicates the base point of the text.

Options

 * Click on to select the type of information to display, including "Custom", "Name", "Label", "Position", "Length", "Area", "Volume", "Tag", and "Material". (See explanation of  Label types below)
 * To enter coordinates manually, simply enter the numbers, then press between each X, Y and Z component. You can press the  button when you have the desired values to insert the point.
 * Hold while placing the label to force snapping your point to the nearest snap location, independently of the distance.
 * Press or the  button to abort the current command.

Data

 * : specifies the type of information shown by this label (see Label types below).
 * : specifies the text block to display when is set to "Custom", or the label is not parametric. The text is given as a list of strings; each element on the list, separated by a comma, indicates a new line of text.
 * : (read-only) indicates the actual text displayed by the label, depending on the.
 * : specifies the position of the tip of the leader.
 * : specifies the direction of the straight segment of the leader, either horizontal or vertical.
 * : specifies the length of the straight segment of the leader, starting from the base point of the text. If the distance is positive, the leader starts from the right side of the text, and the text aligns to the right; otherwise, the leader starts from the left side of the text, and the text aligns to the left.
 * : specifies the base point of the first line of the text block; it also influences how the leader is drawn.
 * : specifies the rotation of the baseline of the first line of the text block; it also influences how the leader is drawn, as it will no longer be horizontal or vertical.
 * : specifies the axis to use for the rotation.

Label types

 * displays the contents of.
 * displays the internal name of the target object; the internal name is assigned to the object at its creation time, and remains fixed throughout the existence of the object.
 * displays the label of the target object; the label of the object can be changed by the user at any time.
 * displays the coordinates of the base point of the target object, of the target vertex, or of the center of mass of the target sub-element, if applicable.
 * displays the length of the target sub-element, if applicable.
 * displays the area of the target sub-element, if applicable.
 * displays the volume of the target object, if applicable.
 * displays the attribute of the target object, if the object has such property, for example, objects created with the Arch Workbench.
 * displays the label of the material of the target object, if the target object has such property.

View

 * : specifies the font to use to draw the text. It can be a font name, such as "Arial", a default style such as "sans", "serif" or "mono", a family such as "Arial,Helvetica,sans" or a name with a style such as "Arial:Bold". If the given font is not found on the system, a generic one is used instead.
 * : specifies the size of the text. If the label object is created in the tree view but no text is visible in the 3D view, increase the size of the text until it is visible.
 * : specifies the vertical alignment of the baseline of the text with respect to the leader. It can be top, middle or bottom.
 * : specifies the color of the text in an RGB tuple (R, G, B).
 * : specifies the width of the leader.
 * : specifies the color of the leader.
 * : specifies the size of the symbol displayed at the tip of the leader.
 * : specifies the type of symbol displayed at the tip of the leader, which can be dot, circle, arrow, or tick.
 * : if it is "Rectangle" it will draw a frame around the text.
 * : if it is the leader line will be displayed; otherwise only the text and the symbol at the tip will be displayed.
 * : if it is "3D text" the text will be aligned to the scene axes, initially lying on the XY plane; if it is "2D text" the text will always face the camera.

Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Label use the method of the Draft module:

Example: