TechDraw RichTextAnnotation: Difference between revisions

From FreeCAD Documentation
(SeeAlso)
(Notes)
Line 40: Line 40:
# After the block is created, it can be edited by double clicking the RichTextAnnotation in the Tree.
# After the block is created, it can be edited by double clicking the RichTextAnnotation in the Tree.
# To attach the block to a [[TechDraw_LeaderLine|Leaderline]], select the line before starting the RichTextBlock tool.
# To attach the block to a [[TechDraw_LeaderLine|Leaderline]], select the line before starting the RichTextBlock tool.

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

<!--T:21-->
* After creation a RichTextAnnotation can be edited by double clicking it in the [[Tree_view|Tree view]].


==Properties== <!--T:19-->
==Properties== <!--T:19-->
Line 68: Line 73:
}}
}}
<translate>
<translate>

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

<!--T:21-->
* You can edit your RichTextBlock by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported.





Revision as of 09:51, 26 July 2023

TechDraw RichTextAnnotation

Menu location
TechDraw → Annotations → Insert Rich Text Annotations
Workbenches
TechDraw
Default shortcut
None
Introduced in version
0.19
See also
TechDraw Annotation

Description

The TechDraw RichTextAnnotation tool adds a formatted annotation block to a Leaderline or a View.

Stand alone RichTextAnnotation

Usage

  1. Press the Insert Rich Text Annotation button
  2. A Task dialog will open. The dialog allows quick entry of text.
  3. The Start Rich Text Editor button will open a full featured editor. Press the Save icon to record your changes.
  4. After the block is created, it can be edited by double clicking the RichTextAnnotation in the Tree.
  5. To attach the block to a Leaderline, select the line before starting the RichTextBlock tool.

Notes

  • After creation a RichTextAnnotation can be edited by double clicking it in the Tree view.

Properties

  • DataX,Y: The location of the block. Relative to the end of the line if attached to a Leaderline, otherwise this is the position on the page.
  • DataShowFrame: Draws an outline around the block.
  • DataMaxWidth: Limits the horizontal size of the block. A value of -1 is for unlimited width.
  • DataAnnoText: The HTML text of the block.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

The RichTextAnnotation tool can be used in macros and from the Python console.

myPage = FreeCAD.ActiveDocument().Page
myBase = FreeCAD.ActiveDocument().View
blockObj = FreeCAD.ActiveDocument.addObject('TechDraw::DrawRichAnno','DrawRichAnno')
FreeCAD.activeDocument().myPage.addView(blockObj)
blockObj.X = 5
blockObj.Y = 5
blockObj.AnnoText = myHTMLText