Difference between revisions of "TechDraw NewAnnotation"

From FreeCAD Documentation
Jump to: navigation, search
m ((Vertical Docnav))
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<translate>
 
<translate>
 
<!--T:20-->
 
<!--T:20-->
{{Docnav|[[TechDraw_Redraw|Redraw]]|[[TechDraw_LeaderLine|LeaderLine]]|[[TechDraw_Module|TechDraw]]|IconL=TechDraw_Tree_Page_Sync.svg|IconC=Workbench_TechDraw.svg|IconR=Techdraw-mline.svg}}
+
{{Docnav
 +
|[[TechDraw_Redraw|Redraw]]
 +
|[[TechDraw_LeaderLine|LeaderLine]]
 +
|[[TechDraw_Module|TechDraw]]
 +
|IconL=TechDraw_Tree_Page_Sync.svg
 +
|IconC=Workbench_TechDraw.svg
 +
|IconR=Techdraw-mline.svg
 +
}}
  
 
<!--T:1-->
 
<!--T:1-->
Line 9: Line 16:
 
|MenuLocation=TechDraw → Annotation
 
|MenuLocation=TechDraw → Annotation
 
|Workbenches=[[TechDraw Module|TechDraw]]
 
|Workbenches=[[TechDraw Module|TechDraw]]
|SeeAlso=[[Draft Text]], [[Draft ShapeString]]
+
|SeeAlso=[[Draft Text|Draft Text]], [[Draft ShapeString|Draft ShapeString]]
 
}}
 
}}
  
Line 34: Line 41:
 
<!--T:8-->
 
<!--T:8-->
 
{{Caption|Modifying the annotation through the property editor}}
 
{{Caption|Modifying the annotation through the property editor}}
 +
 +
<!--T:23-->
 +
<!-- Editor's and Traducer's note: do not change the &amp; values, they are used to escape the symbols and show them verbatim -->
 +
 +
<!--T:24-->
 +
{{Emphasis|Note:}} some characters interfere with the internal representation of the Annotation text.  Specifically, these are the double quote {{incode|"}}, less than {{incode|<}}, and greater than {{incode|>}} symbols; these must be replaced by HTML escape characters, {{incode|&amp;quot;}}, {{incode|&amp;lt;}}, and {{incode|&amp;gt;}} respectively. See [https://en.wikipedia.org/wiki/Character_encodings_in_HTML#HTML_character_references Character encodings in HTML] for details.
  
 
==Properties== <!--T:5-->
 
==Properties== <!--T:5-->
 +
 +
<!--T:12-->
 +
The Annotation inherits all applicable basic View properties except {{PropertyData|Scale}}. Use the {{PropertyData|TextSize}} property instead.
  
 
<!--T:11-->
 
<!--T:11-->
Line 45: Line 61:
 
* {{PropertyData|LineSpace}}: Line spacing adjustment (%).
 
* {{PropertyData|LineSpace}}: Line spacing adjustment (%).
 
* {{PropertyData|TextStyle}}: "Normal", "Bold", "Italic", "Bold-Italic"
 
* {{PropertyData|TextStyle}}: "Normal", "Bold", "Italic", "Bold-Italic"
 
<!--T:12-->
 
Note: Annotation inherits all applicable basic View properties except Scale. Use the TextSize property instead.
 
  
 
==Scripting== <!--T:6-->
 
==Scripting== <!--T:6-->
  
 
<!--T:16-->
 
<!--T:16-->
{{Emphasis|See also:}} [[TechDraw API]] and [[FreeCAD Scripting Basics]].
+
{{Emphasis|See also:}} [[TechDraw API|TechDraw API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
  
 
<!--T:17-->
 
<!--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|macros]] and from the [[Python|Python]] console by using the following functions:
  
 
</translate>
 
</translate>
Line 67: Line 80:
  
 
==Notes== <!--T:22-->
 
==Notes== <!--T:22-->
* Some characters interfere with the internal representation of the Annotation text.  Specifically, ", < and > must be replaced with & quot; , & lt; and & gt; respectively (remove the extra space.  Wiki is also affected by these characters!). See [https://en.wikipedia.org/wiki/Character_encodings_in_HTML#HTML_character_references HTML escape characters] for details.
 
 
  
 
<!--T:21-->
 
<!--T:21-->
{{Docnav|[[TechDraw_Redraw|Redraw]]|[[TechDraw_LeaderLine|LeaderLine]]|[[TechDraw_Module|TechDraw]]|IconL=TechDraw_Tree_Page_Sync.svg|IconC=Workbench_TechDraw.svg|IconR=Techdraw-mline.svg}}
+
{{Docnav
 +
|[[TechDraw_Redraw|Redraw]]
 +
|[[TechDraw_LeaderLine|LeaderLine]]
 +
|[[TechDraw_Module|TechDraw]]
 +
|IconL=TechDraw_Tree_Page_Sync.svg
 +
|IconC=Workbench_TechDraw.svg
 +
|IconR=Techdraw-mline.svg
 +
}}
  
  

Latest revision as of 10:05, 16 October 2019

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎română • ‎русский
Arrow-left.svg Previous: TechDraw Tree Page Sync.svg Redraw
Next: LeaderLine Techdraw-mline.svg Arrow-right.svg

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


Note: some characters interfere with the internal representation of the Annotation text. Specifically, these are the double quote ", less than <, and greater than > symbols; these must be replaced by HTML escape characters, &quot;, &lt;, and &gt; respectively. See Character encodings in HTML for details.

Properties

The Annotation inherits all applicable basic View properties except DATAScale. Use the DATATextSize property instead.

  • 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"

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)

Notes

Arrow-left.svg Previous: TechDraw Tree Page Sync.svg Redraw
Next: LeaderLine Techdraw-mline.svg Arrow-right.svg