TechDraw LeaderLine: Difference between revisions

From FreeCAD Documentation
m (cleanup and an addition)
m (formatting)
(17 intermediate revisions by 4 users not shown)
Line 29: Line 29:
<translate>
<translate>
<!--T:9-->
<!--T:9-->
{{Caption|Leader line added to View001}}
{{Caption|Leaderline added to View001}}


==How to use== <!--T:3-->
==Usage== <!--T:3-->

===Creation=== <!--T:23-->


<!--T:10-->
<!--T:10-->
# Select a view.
# Press the {{Button|[[Image:TechDraw_LeaderLine.svg|16px]] [[TechDraw_LeaderLine|Add Leaderline to View]]}} button
# A Task dialog will open. The dialog allows drawing of the leader line and assigning end symbols to the line.
# Press the {{Button|[[Image:TechDraw_LeaderLine.svg|16px]] Add Leaderline to View}} button. A dialog will open allowing to draw the leaderline and assigning end symbols to the line.
# The Pick points button starts a line drawing function. Line drawing always starts at the point the line is to be attached to the View.
# Click on {{Button|Pick points}} and then click into the page to define the starting point of the line.
# Click to add a point, move the mouse to draw a line segment.
# Move the mouse and click on another point to create a line.
# Now you can either
# To exit the line editor, press the Save changes button.
## finish the line drawing by double-clicking or pressing {{Button|Save Points}}.
# To exit the line editor without saving, press the Discard changes button.
## add further points to define more line segments.
# After the line is created, it can be edited by double clicking the Leaderline in the Tree.
# To finish the creation, press {{Button|OK}} to close the dialog.

<!--T:22-->
'''Note:''' If you did not define any points when creating the leaderline, a short line will be placed at the center of the view.

===Editing=== <!--T:24-->

<!--T:25-->
# Select the Leaderline in the document tree and double-click on it.
# A dialog will open where you can change the appearance.
# To edit the points, click on {{Button|Edit points}} and the line points become visible in the drawing.
# Drag the points to a place you like and finish the change by clicking on {{Button|Save changes}}.


==Properties== <!--T:19-->
==Properties== <!--T:19-->


<!--T:20-->
<!--T:20-->
* {{PropertyData|X,Y}}: The point at which the leader line is connected to the View.
* {{PropertyData|X,Y}}: The point at which the leaderline is connected to the View.
* {{PropertyData|Leader Parent}}: The View to which the leader is attached.
* {{PropertyData|Leader Parent}}: The View to which the leader is attached.
* {{PropertyData|Start Symbol}}: The symbol at the start: [[Image:Arrownone.svg|20px]] None, [[Image:Arrowfilled.svg|20px]] Filled Arrow, [[Image:Arrowopen.svg|20px]] Open Arrow, [[Image:Arrowtick.svg|20px]] Tick, [[Image:Arrowdot.svg|20px]] Dot, [[Image:arrowopendot.svg|20px]] Open Circle, [[Image:arrowfork.svg|20px]] Fork, [[Image:arrowpyramid.svg|20px]] Filled Triangle
* {{PropertyData|Start Symbol}}: The line end symbol (arrowhead) at the View end.
* {{PropertyData|End Symbol}}: The line end symbol at the other end.
* {{PropertyData|End Symbol}}: The symbol at the end.
* {{PropertyData|WayPoints}}: Nodes on the leader line.
* {{PropertyData|WayPoints}}: Nodes on the leaderline.
* {{PropertyData|Scalable}}: Leader scales with Leader Parent.
* {{PropertyData|Scalable}}: Leader scales with Leader Parent.
* {{PropertyData|Auto Horizontal}}: Forces last leaderline segment to be horizontal.
* {{PropertyView|Color}}: Pen colour for the leader line.
* {{PropertyView|Line Style}}: 0 - No Line, 1 - Solid Line, ...
* {{PropertyView|Color}}: Pen colour for the leaderline.
* {{PropertyView|Line Style}}: 0 NoLine, 1 [[Image:Continuous-line.svg|20px]] Continuous, 2 [[Image:Dash-line.svg|20px]] Dash, 3 [[Image:Dot-line.svg|20px]] Dot, 4 [[Image:DashDot-line.svg|20px]] DashDot, 5 [[Image:DashDotDot-line.svg|20px]] DashDotDot
* {{PropertyView|Line Width}}: Weight of leader line.
* {{PropertyView|Line Width}}: Weight of leaderline.


==Scripting== <!--T:6-->
==Scripting== <!--T:6-->
Line 76: Line 91:
leaderObj.Y = 5
leaderObj.Y = 5
}}
}}

<translate>
<translate>


==Notes== <!--T:18-->
==Notes== <!--T:18-->
* You can edit your Leaderline by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported.
* You can edit a Leaderline by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported. The line segment(s) can be edited by pressing {{Button|Edit points}}. To exit the point editing, press {{Button|Save changes}} or {{Button|Discard changes}}.
* If you did not define any points when creating the leaderline, a short line will be placed at the center of the view. You can later not add further points.
* The leader line can be edited by pressing "Edit points" while in edit mode. To exit point editing: press "Save changes" or "Discard changes".
* By default the [[TechDraw_Preferences|preferences]] option '''Leader Line Auto Horizontal''' is activated. Therefore the last line segment will be horizontal. So if you only have one segment, you get a horizontal line, no matter where you picked the second point.
* You can turn off the auto horizontal feature for existing Leaderlines changing the {{PropertyData|Auto Horizontal}} property.


<!--T:17-->
<!--T:17-->
Line 93: Line 109:
}}
}}


<!--T:14-->
{{TechDraw Tools navi}}

<!--T:15-->
{{Userdocnavi}}
</translate>
</translate>
{{TechDraw Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Revision as of 13:40, 30 March 2020

TechDraw LeaderLine

Menu location
TechDraw → Add Lines → Add Leaderline to View
Workbenches
TechDraw
Default shortcut
None
Introduced in version
0.19
See also
Insert Rich Text Annotation, Add Welding Information to Leader, Line Groups

Description

The LeaderLine tool adds a line to a View. Other annotation objects (such as Rich Text Annotations) can be connected to the leaderline to form complex annotations.

Leaderline added to View001

Usage

Creation

  1. Select a view.
  2. Press the Add Leaderline to View button. A dialog will open allowing to draw the leaderline and assigning end symbols to the line.
  3. Click on Pick points and then click into the page to define the starting point of the line.
  4. Move the mouse and click on another point to create a line.
  5. Now you can either
    1. finish the line drawing by double-clicking or pressing Save Points.
    2. add further points to define more line segments.
  6. To finish the creation, press OK to close the dialog.

Note: If you did not define any points when creating the leaderline, a short line will be placed at the center of the view.

Editing

  1. Select the Leaderline in the document tree and double-click on it.
  2. A dialog will open where you can change the appearance.
  3. To edit the points, click on Edit points and the line points become visible in the drawing.
  4. Drag the points to a place you like and finish the change by clicking on Save changes.

Properties

  • DataX,Y: The point at which the leaderline is connected to the View.
  • DataLeader Parent: The View to which the leader is attached.
  • DataStart Symbol: The symbol at the start: None, Filled Arrow, Open Arrow, Tick, Dot, Open Circle, Fork, Filled Triangle
  • DataEnd Symbol: The symbol at the end.
  • DataWayPoints: Nodes on the leaderline.
  • DataScalable: Leader scales with Leader Parent.
  • DataAuto Horizontal: Forces last leaderline segment to be horizontal.
  • ViewColor: Pen colour for the leaderline.
  • ViewLine Style: 0 NoLine, 1 Continuous, 2 Dash, 3 Dot, 4 DashDot, 5 DashDotDot
  • ViewLine Width: Weight of leaderline.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

The LeaderLine tool can be used in macros and from the Python console by using the following functions:

myPage = FreeCAD.ActiveDocument().Page
myBase = FreeCAD.ActiveDocument().View
leaderObj = FreeCAD.ActiveDocument.addObject('TechDraw::DrawLeaderLine','DrawLeaderLine')
FreeCAD.activeDocument().myPage.addView(leaderObj)
FreeCAD.activeDocument().leaderObj.LeaderParent = myBase
#first waypoint is always (0,0,0)  
#rest of waypoints are positions relative to (0,0,0)
leaderObj.WayPoints = [p0,p1,p2]
leaderObj.X = 5
leaderObj.Y = 5

Notes

  • You can edit a Leaderline by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported. The line segment(s) can be edited by pressing Edit points. To exit the point editing, press Save changes or Discard changes.
  • If you did not define any points when creating the leaderline, a short line will be placed at the center of the view. You can later not add further points.
  • By default the preferences option Leader Line Auto Horizontal is activated. Therefore the last line segment will be horizontal. So if you only have one segment, you get a horizontal line, no matter where you picked the second point.
  • You can turn off the auto horizontal feature for existing Leaderlines changing the DataAuto Horizontal property.