|
|
| Menu location |
|---|
| TechDraw → Add Lines → Add Leaderline to View |
| Workbenches |
| TechDraw |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| TechDraw RichTextAnnotation, TechDraw WeldSymbol |
The TechDraw 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 a View
Base
Enumeration): The symbol at the start of the leaderline. Options: Enumeration): The symbol at the end of the leaderline. Idem.Distance): The X coordinate of the leaderline relative to the View.Distance): The Y coordinate of the leaderline relative to the View.Leader
Link): The View the leaderline is attached to.VectorList): The points of the leaderline.Bool): Specifies if the leaderline scales with DataLeader Parent.Bool): Specifies if the last leaderline segment is forced to be horizontal.Base
Bool): Not used.Integer): Over or underlap relative to other drawing objects. introduced in version 0.21Line Format
Color): The color of the leaderline.Enumeration): The style of the leaderline. Options: NoLine, Length): The width of the leaderline.See also: Autogenerated API documentation 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