TechDraw RichTextBlock

From FreeCAD Documentation
Revision as of 02:51, 6 May 2019 by Wandererfan (talk | contribs) (Created page with "<languages/> <translate> <!--T:16--> {{Docnav|LeaderLine|Hatching|TechDraw|IconL=TechDraw_Tree_Page_Sync.png|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Other languages:
English • ‎français • ‎italiano
Arrow-left.svg Previous: TechDraw Tree Page Sync.png LeaderLine
Next: Hatching Arrow-right.svg

Techdraw-textleader.svg TechDraw RichTextBlock

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


Description

The RichTextBlock tool adds a formatted annotation block to a LeaderLine or a View.

TechDraw RichTextBlock sample.png

Stand alone RichTextBlock


How to use

  1. Press the Techdraw-textleader.svg RichTextBlock 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 RichTextBlock in the Tree.
  5. To attach the block to a LeaderLine, select the line before starting the RichTextBlock tool.


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: TechDraw API and FreeCAD Scripting Basics.

The RichTextBlock 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

Notes

  • This feature was added in v0.19
  • You can edit your RichTextBlock by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported.
Arrow-left.svg Previous: TechDraw Tree Page Sync.png LeaderLine
Next: Hatching Arrow-right.svg