Difference between revisions of "TechDraw NewAnnotation"

From FreeCAD Documentation
Jump to: navigation, search
(Marked this version for translation)
Line 11: Line 11:
 
==Description== <!--T:2-->
 
==Description== <!--T:2-->
  
 +
<!--T:13-->
 
The Annotation tool adds a text block to a drawing page.
 
The Annotation tool adds a text block to a drawing page.
  
 +
<!--T:14-->
 
[[Image:AnnotationSample.png]]
 
[[Image:AnnotationSample.png]]
 
{{Caption|Annotation in the drawing page}}
 
{{Caption|Annotation in the drawing page}}
Line 18: Line 20:
 
==How to use== <!--T:3-->
 
==How to use== <!--T:3-->
  
 +
<!--T:15-->
 
# If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
 
# If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
 
# Press the {{KEY|[[Image:TechDraw_NewAnnotation.png|24px]] [[TechDraw NewAnnotation|Annotation]]}} button
 
# Press the {{KEY|[[Image:TechDraw_NewAnnotation.png|24px]] [[TechDraw NewAnnotation|Annotation]]}} button
Line 45: Line 48:
 
==Scripting== <!--T:6-->
 
==Scripting== <!--T:6-->
  
 +
<!--T:16-->
 
{{Emphasis|See also:}} [[TechDraw API]] and [[FreeCAD Scripting Basics]].
 
{{Emphasis|See also:}} [[TechDraw API]] and [[FreeCAD Scripting Basics]].
  
 +
<!--T:17-->
 
The New Annotation tool can be used in [[macros]] and from the [[Python]] console by using the following functions:
 
The New Annotation tool can be used in [[macros]] and from the [[Python]] console by using the following functions:
  
Line 58: Line 63:
 
<translate>
 
<translate>
  
 +
<!--T:18-->
 
{{TechDraw Tools navi}}
 
{{TechDraw Tools navi}}
  
 +
<!--T:19-->
 
{{Userdocnavi}}
 
{{Userdocnavi}}
 
</translate>
 
</translate>
 
{{clear}}
 
{{clear}}

Revision as of 21:26, 3 January 2019

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎română • ‎русский

TechDraw NewAnnotation.png TechDraw NewAnnotation

Menu location
TechDraw → Annotation
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
Draft Text, Draft ShapeString


Description

The Annotation tool adds a text block to a drawing page.

AnnotationSample.png

Annotation in the drawing page


How to use

  1. If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
  2. Press the TechDraw NewAnnotation.png Annotation button
  3. A text block containing "Default Text" will appear on the page. Use the property editor to change the text. Drag the Annotation to the required position.
  4. You may need to press recompute View-rotate-right.png to get your text to change.

UpdateAnnotation.png

Modifying the annotation through the property editor


Properties

  • DATAText: The text to be displayed.
  • DATAFont: The name of the font to use. Annotation will use the best match of installed fonts.
  • DATATextColor: The color of the text.
  • DATATextSize: The size of the text in mm.
  • DATAMaxWidth: The maximum width of the Annotation block. -1 indicates no maximum width.
  • DATALineSpace: Line spacing adjustment (%).
  • DATATextStyle: "Normal", "Bold", "Italic", "Bold-Italic"

Note: Annotation inherits all applicable basic View properties except Scale. Use the TextSize property instead.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

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

anno = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewAnnotation','TestAnno')
anno.Text = ['Different Text']
anno.TextStyle = 'Bold'
rc = page.addView(anno)