TechDraw RichTextAnnotation/ru: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 19: Line 19:
}}
}}


<span id="Description"></span>
==Описание==
==Описание==


The RichTextBlock tool adds a formatted annotation block to a [[TechDraw_LeaderLine|Leaderline]] or a View.
The '''TechDraw RichTextAnnotation''' tool adds a formatted annotation block to a [[TechDraw_LeaderLine|Leaderline]] or a View.


[[Image:TechDraw_RichTextBlock_sample.png|220px]]
[[Image:TechDraw_RichTextBlock_sample.png|220px]]
{{Caption|Stand alone RichTextBlock}}
{{Caption|Stand alone RichTextAnnotation}}


<span id="Usage"></span>
==Применение==
==Применение==


Line 31: Line 33:
# A Task dialog will open. The dialog allows quick entry of text.
# A Task dialog will open. The dialog allows quick entry of text.
# The {{Button|Start Rich Text Editor}} button will open a full featured editor. Press the Save icon to record your changes.
# The {{Button|Start Rich Text Editor}} button will open a full featured editor. Press the Save icon to record your changes.
# After the block is created, it can be edited by double clicking the RichTextBlock 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.


<span id="Properties"></span>
==Свойства==
==Свойства==


* {{PropertyData|X,Y}}: The location of the block. Relative to the end of the line if attached to a [[TechDraw_LeaderLine|Leaderline]], otherwise this is the position on the page.
* {{PropertyData|X,Y}}: The location of the block. Relative to the end of the line if attached to a [[TechDraw_LeaderLine|Leaderline]], otherwise this is the position on the page.
* {{PropertyData|ShowFrame}}: Draws an outline around the block.
* {{PropertyData|ShowFrame}}: Draws an outline around the block.
* {{PropertyData|MaxWidth}}: Limits the horizontal size of the block. A value of -1 is for unlimited width.
* {{PropertyData|MaxWidth}}: Limits the horizontal size of the block. A value of -1 is for unlimited width.
* {{PropertyData|AnnoText}}: The HTML text of the block.
* {{PropertyData|AnnoText}}: The HTML text of the block.


<span id="Scripting"></span>
==Программирование==
==Программирование==


{{Emphasis|См. так же:}} [[TechDraw_API/ru|TechDraw API]] и [[FreeCAD_Scripting_Basics/ru|Основы составления скриптов FreeCAD]].
{{Emphasis|См. так же:}} [[TechDraw_API/ru|TechDraw API]] и [[FreeCAD_Scripting_Basics/ru|Основы составления скриптов FreeCAD]].


The RichTextBlock tool can be used in [[Macros|macros]] and from the [[Python|Python]] console.
The RichTextAnnotation tool can be used in [[Macros|macros]] and from the [[Python|Python]] console.

{{Code|code=
{{Code|code=
myPage = FreeCAD.ActiveDocument().Page
myPage = FreeCAD.ActiveDocument().Page
Line 56: Line 61:
}}
}}


<span id="Notes"></span>
==Примечания==
==Примечания==



Revision as of 08:57, 29 May 2023

Other languages:

Вставка аннотаций форматированным текстом

Системное название
TechDraw_RichTextAnnotation
Расположение в меню
TechDraw → Заметки → Вставка аннотаций форматированным текстомs
Верстаки
TechDraw
Быстрые клавиши
Нет
Представлено в версии
0.19
См. также
Шаблоны, Draft SVG, Добавить Линию-выноску в Вид

Описание

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

Stand alone RichTextAnnotation

Применение

  1. Press the 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.

Свойства

  • ДанныеX,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.
  • ДанныеShowFrame: Draws an outline around the block.
  • ДанныеMaxWidth: Limits the horizontal size of the block. A value of -1 is for unlimited width.
  • ДанныеAnnoText: The HTML text of the block.

Программирование

См. так же: TechDraw API и Основы составления скриптов FreeCAD.

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

Примечания

  • You can edit your RichTextBlock by double clicking on it in the tree view. Double clicking in the graphics area is not yet supported.