TechDraw Symbol: Difference between revisions

From FreeCAD Documentation
(Image:Techdraw-symbol.svg)
(New image and caption)
Line 10: Line 10:


==Description== <!--T:2-->
==Description== <!--T:2-->
The Symbol tool inserts an [[SVG]] file into the page as a view
The Symbol tool inserts an [[SVG]] file into the page. This symbol can be anything that helps annotating your drawing, and that doesn't need to be further modified.

</translate>
[[Image:Compass_Rose_01.svg]]
<translate>
{{Caption|Compass rose added to the drawing page}}


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

Revision as of 21:10, 26 November 2018

TechDraw Symbol

Menu location
TechDraw → Symbol
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw Templates, Draft SVG

Description

The Symbol tool inserts an SVG file into the page. This symbol can be anything that helps annotating your drawing, and that doesn't need to be further modified.

File:Compass Rose 01.svg

Compass rose added to the drawing page

How to use

  1. Press the File:Techdraw-symbol.svg Symbol button
  2. A File Save dialog will open. Select a location and file name.

If the symbol appears larger than expected, use the scale property to adjust its size.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

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

sym = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewSymbol','TestSymbol')
rc = page.addView(anno)
f = open(unicode(symbolFileSpec,'utf-8'),'r')
svg = f.read()
f.close()
sym.Symbol = svg
rc = page.addView(sym)