TechDraw LeaderLine/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 34: Line 34:
## add further points to define more line segments.
## add further points to define more line segments.
# To finish the creation, press {{Button|OK}} to close the dialog.
# To finish the creation, press {{Button|OK}} to close the dialog.

After the line is created, it can be edited by double clicking the LeaderLine in the tree.


'''Note:''' If you did not define any points when creating the leader line, a short line will be placed at the center of the view. You can later not add further points.
'''Note:''' If you did not define any points when creating the leader line, a short line will be placed at the center of the view. You can later not add further points.
Line 47: Line 45:
* {{PropertyData|WayPoints}}: Nodes on the leader line.
* {{PropertyData|WayPoints}}: Nodes on the leader line.
* {{PropertyData|Scalable}}: Leader scales with Leader Parent.
* {{PropertyData|Scalable}}: Leader scales with Leader Parent.
* {{PropertyData|Auto Horizontal}}: Forces last leader line segment to be horizontal.
* {{PropertyView|Color}}: Pen colour for the leader line.
* {{PropertyView|Color}}: Pen colour for the leader line.
* {{PropertyView|Line Style}}: 0 - No Line, 1 - Continuous, ...
* {{PropertyView|Line Style}}: 0 - No Line, 1 - Continuous, ...
Line 69: Line 68:
leaderObj.Y = 5
leaderObj.Y = 5
}}
}}



==Notes==
==Notes==
* 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 leader line, 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 {{Button|Edit points}} while in edit mode. To exit point editing: press {{Button|Save changes}} or {{Button|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.


{{Docnav
{{Docnav

Revision as of 21:55, 18 February 2020

Other languages:

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.

Leader line added to View001

Usage

  1. Select a view.
  2. Press the Add Leaderline to View button. A dialog will open allowing to draw the leader line and assigning end symbols to the line.
  3. Press 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 leader line, a short line will be placed at the center of the view. You can later not add further points.

Properties

  • ДанныеX,Y: The point at which the leader line is connected to the View.
  • ДанныеLeader Parent: The View to which the leader is attached.
  • ДанныеStart Symbol: The line end symbol (arrowhead) at the View end.
  • ДанныеEnd Symbol: The line end symbol at the other end.
  • ДанныеWayPoints: Nodes on the leader line.
  • ДанныеScalable: Leader scales with Leader Parent.
  • ДанныеAuto Horizontal: Forces last leader line segment to be horizontal.
  • ВидColor: Pen colour for the leader line.
  • ВидLine Style: 0 - No Line, 1 - Continuous, ...
  • ВидLine Width: Weight of leader line.

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 leader line, 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 ДанныеAuto Horizontal property.