TechDraw Annotation: Difference between revisions

From FreeCAD Documentation
(update menu)
(SeeAlso)
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:20-->
<!--T:20-->
{{Docnav
{{Docnav
|[[TechDraw_DimensionRepair|DimensionRepair]]
|[[TechDraw_ToggleFrame|Turn View Frames On/Off]]
|[[TechDraw_LeaderLine|Add Leaderline to View]]
|[[TechDraw_LeaderLine|LeaderLine]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ToggleFrame.svg
|IconL=TechDraw_DimensionRepair.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_LeaderLine.svg
|IconR=TechDraw_LeaderLine.svg
|IconC=Workbench_TechDraw.svg
}}
}}


Line 15: Line 16:
|Name=TechDraw Annotation
|Name=TechDraw Annotation
|MenuLocation=TechDraw → Annotations → Insert Annotation
|MenuLocation=TechDraw → Annotations → Insert Annotation
|Workbenches=[[TechDraw Module|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|SeeAlso=[[TechDraw_RichTextAnnotation|TechDraw RichTextAnnotation]]
|SeeAlso=[[Draft Text|Draft Text]], [[Draft ShapeString|Draft ShapeString]]
}}
}}


Line 22: Line 23:


<!--T:13-->
<!--T:13-->
The Annotation tool adds a text block to a drawing page.
The '''TechDraw Annotation''' tool adds a text block to a drawing page.


<!--T:14-->
<!--T:14-->
[[Image:AnnotationSample.png]]
[[Image:AnnotationSample.png|250px]]
{{Caption|Annotation in the drawing page}}
{{Caption|Annotation in the drawing page}}


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


<!--T:15-->
<!--T:15-->
# If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
# If there are multiple drawing pages in the document: optionally activate the desired page by selecting it in the [[Tree_view|Tree view]].
# There are several ways to invoke the tool:
# Press the {{KEY|[[Image:TechDraw_Annotation.svg|24px]] [[TechDraw_Annotation|Insert Annotation]]}} button
#* Press the {{Button|[[Image:TechDraw_Annotation.svg|16px]] [[TechDraw_Annotation|Insert Annotation]]}} button.
# 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.
#* Select the {{MenuCommand|TechDraw → Annotations → [[Image:TechDraw_Annotation.svg|16px]] Insert Annotation}} option from the menu.
# You may need to press {{Button|[[Image:Std_Refresh.svg|16px]] [[Std_Refresh|Refresh]]}} and/or {{Button|[[Image:TechDraw RedrawPage.svg|16px]] [[TechDraw_RedrawPage|Redraw Page]]}} to get your text to change.
# If there are multiple drawing pages in the document and you have not yet activated a page, the {{MenuCommand|Page Chooser}} dialog box opens: {{Version|0.20}}
## Select the desired page.
## Press the {{Button|OK}} button.
# A text block containing ''Default Text'' appears on the page.
# Use the [[Property_editor|Property editor]] to change the text.
# Optionally drag the Annotation to the different position.


</translate>
</translate>
Line 40: Line 47:
<translate>
<translate>
<!--T:8-->
<!--T:8-->
{{Caption|Modifying the annotation through the property editor}}
{{Caption|Modifying the annotation through the Property editor}}


<!--T:23-->
==Notes== <!--T:22-->
<!-- 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-->
<!--T:24-->
<!-- Editor's and Traducer's note: do not change the &amp; values, they are used to escape the symbols and show them verbatim -->
{{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.
* 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-->
Line 65: Line 72:


<!--T:16-->
<!--T:16-->
{{Emphasis|See also:}} [[TechDraw API|TechDraw API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:17-->
<!--T:17-->
The New Annotation tool can be used in [[macros|macros]] and from the [[Python|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 79: Line 86:
<translate>
<translate>


==Notes== <!--T:22-->


<!--T:21-->
<!--T:21-->
{{Docnav
{{Docnav
|[[TechDraw_DimensionRepair|DimensionRepair]]
|[[TechDraw_ToggleFrame|Turn View Frames On/Off]]
|[[TechDraw_LeaderLine|Add Leaderline to View]]
|[[TechDraw_LeaderLine|LeaderLine]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ToggleFrame.svg
|IconL=TechDraw_DimensionRepair.svg
|IconR=TechDraw_LeaderLine.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_LeaderLine.svg
}}
}}


<!--T:18-->
{{TechDraw Tools navi}}

<!--T:19-->
{{Userdocnavi}}
</translate>
</translate>
{{TechDraw Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 09:46, 26 July 2023

TechDraw Annotation

Menu location
TechDraw → Annotations → Insert Annotation
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw RichTextAnnotation

Description

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

Annotation in the drawing page

Usage

  1. If there are multiple drawing pages in the document: optionally activate the desired page by selecting it in the Tree view.
  2. There are several ways to invoke the tool:
    • Press the Insert Annotation button.
    • Select the TechDraw → Annotations → Insert Annotation option from the menu.
  3. If there are multiple drawing pages in the document and you have not yet activated a page, the Page Chooser dialog box opens: introduced in version 0.20
    1. Select the desired page.
    2. Press the OK button.
  4. A text block containing Default Text appears on the page.
  5. Use the Property editor to change the text.
  6. Optionally drag the Annotation to the different position.

Modifying the annotation through the Property editor

Notes

  • 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: Autogenerated API documentation 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)