Draft Label: Difference between revisions
(Justification of the text depending on the direction of the lead.) |
(More information for the options) |
||
Line 35: | Line 35: | ||
<!--T:7--> |
<!--T:7--> |
||
* {{Button|Label type}} specifies the type of information to display, including "custom", "name", "label", "position", "length", "area", "volume", "tag", and "material". |
|||
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. |
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. |
||
* Press {{KEY|Ctrl}} to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance. |
* Press {{KEY|Ctrl}} to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance. |
Revision as of 18:34, 9 November 2018
Draft Label |
Menu location |
---|
Draft → Label |
Workbenches |
Draft, Arch |
Default shortcut |
D L |
Introduced in version |
0.17 |
See also |
Draft Text, Draft ShapeString |
Description
The Label tool inserts a piece of text with a 2-segment 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.
To insert a simpler text element without an arrow use Draft Text. To create solid text shapes use Draft ShapeString with Part Extrude.
How to use
- Press the Draft Label button, or press D then L keys.
- Click a first point on the 3D view, or type a coordinate and press the add point button. This point indicates the target (arrow head). This can be anywhere, it doesn't need to be on an element.
- Click a second point on the 3D view, or type a coordinate and press the add point button. This point indicates the start of a horizontal or vertical lead.
- Click a third point on the 3D view, or type a coordinate and press the add point button. This point indicates the position of the text.
Note: the direction of the horizontal straight segment, to the right or to the left, will automatically justify the text to the opposite direction. If the lead goes vertically up, the text is justified to the left; if it goes vertically down, it is justified to the right.
Note 2: by pre-selecting an object, or a subelement (vertex, edge or face), before pressing the tool button, the label will become parametric, that is, it will remember which object it is bound to, and it will be able to display a particular attribute of the object. If the attributes of the object change later on, the label will adjust the displayed information.
Options
- Label type specifies the type of information to display, including "custom", "name", "label", "position", "length", "area", "volume", "tag", and "material".
- To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component.
- Press Ctrl to force snapping your point to the nearest snap location, independently of the distance.
- Press Esc or the Close button to abort the current command.
Properties
- DataLabel Type: The type of information shown by this label (see below)
- DataCustom Text: The text to display when Label Type is set to custom
- DataPlacement: Indicates the rotation and the position of the text
- DataStraight Distance: The length of the straight segment
- DataStraight Direction: The direction of the straight segment Horizontal or vertical
- DataTarget Point: The point indicated by this label
- ViewText Size: The size of the text
- ViewText Font: The font used for the text
- ViewText Alignment: The vertical alignment of the text: Top, middle or bottom
- ViewText Color: The color of the text
- ViewLine Width: The width of the line
- ViewLine Color: The color of the line
- ViewArrow Type: The type of the arrow: Dot, circle, arrow or tick.
- ViewArrow Size: The size of the arrow
- ViewFrame: Draws a frame around the text
Label types
- Custom: Shows the contents of the Custom Text property
- Name: Shows the name of the target object
- Label: Shows the label of the target object
- Position: Shows the coordinates of the target object (Placement base point), or the coordinates of the target vertex, if applicable, or the coordinates of the center of the target subelement (center of mass)
- Length: Shows the length of the target subelement, if possible
- Area: Shows the area of the target subelement, if possible
- Volume: Shows the volume of the target object, if possible
- Tag: Shows the tag value of the target object, if the target object has such property (which is the case of all Arch objects)
- Material: Shows the label of the material of the target object, if the target object has such property
Scripting
The Text tool can by used in macros and from the python console by using the following function:
makeLabel(targetpoint=None,target=None,direction=None,distance=None,labeltype=None,placement=None)
- Returns the newly created object.
Example:
import FreeCAD,Draft
selection = FreeCADGui.Selection.getSelectionEx()[0]
Draft.makeLabel(FreeCAD.Vector(10,-10,0),selection,"Horizontal",20,"Label")
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub