Draft AnnotationStyleEditor: Difference between revisions

From FreeCAD Documentation
(Created page with "<languages/> <translate> {{UnfinishedDocu}} {{GuiCommand |Name=Draft AnnotationStyleEditor |MenuLocation=Annotation → Annotation styles |Workbenches=Draft...")
 
(→‎Description: The annotation styles are saved as dictionaries in the Meta attribute of the document. This attribute is inspected by the annotation style editor when it is opened.)
Line 14: Line 14:
==Description==
==Description==


The {{Button|[[Image:Draft_AnnotationStyleEditor.svg|16px]] [[Draft_AnnotationStyleEditor|Draft Annotation style editor]]}} tool allows you to define styles that affect the visual properties of annotation-like objects, like [[Draft_Text|Draft Text]], [[Draft_Dimension|Draft Dimension]], and {{[[File:Draft_Label.svg]] [[Draft Label|Draft Label]]}}.
The {{Button|[[Image:Draft_AnnotationStyleEditor.svg|16px]] [[Draft_AnnotationStyleEditor|Annotation style editor]]}} tool allows you to define styles that affect the visual properties of annotation-like objects, like {{Button|[[File:Draft_Text.svg|16px]] [[Draft_Text|Text]]}}, {{Button|[[File:Draft_Dimension.svg|16px]] [[Draft_Dimension|Dimension]]}}, and {{Button|[[File:Draft_Label.svg|16px]] [[Draft Label|Label]]}}.


</translate>
</translate>
[[File:Draft_AnnotationStyleEditor.png]]
[[File:Draft_AnnotationStyleEditor_example.png]]
<translate>
<translate>
{{Caption|Style editor to configure the annotations.}}
{{Caption|Style editor to configure the annotations.}}

== Usage ==

# Press {{Button|[[Image:Draft_AnnotationStyleEditor.svg|16px]] [[Draft_AnnotationStyleEditor|Draft Annotation style editor]]}} button.
# Open the combobox, and then choose {{Button|Add new...}} to define a new style, or select one of the existing styles.
# Adjust the properties of the style, and then press {{Button|OK}} when satisfied.

Use the {{Button|[[File:Accessories-text-editor.svg|16px]] Rename}} or {{Button|[[File:Edit_Cancel.svg|16px]] Delete}} to rename or delete the active style.

== Styles ==

The annotation styles are saved as dictionaries in the {{incode|Meta}} attribute of the document. This attribute is inspected by the annotation style editor when it is opened.

</translate>
{{Code|code=
print(App.ActiveDocument.Meta["Draft_Style_Custom"])
{"FontName": "DejaVu Sans", "FontSize": "12.0000 ", "LineSpacing": "1 cm", "ScaleMultiplier": 1.0, "ShowUnit": false, "UnitOverride": "m", "Decimals": 2, "ShowLines": true, "LineWidth": 1, "LineColor": 1095216660480, "ArrowType": 0, "ArrowSize": "5.0000 ", "DimensionOvershoot": "1.0000 ", "ExtensionLines": "5.0000 ", "ExtensionOvershoot": "1.0000 "}
}}
<translate>

Since the {{incode|Meta}} attribute can hold arbitrary information, each style that appears in the style editor is prefixed by {{incode|Draft_Style_}}.


</translate>
</translate>
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 02:38, 16 May 2020

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Draft AnnotationStyleEditor

Menu location
Annotation → Annotation styles
Workbenches
Draft
Default shortcut
-
Introduced in version
0.19
See also
Draft Text, Draft Dimension, Draft Label

Description

The Annotation style editor tool allows you to define styles that affect the visual properties of annotation-like objects, like Text, Dimension, and Label.

File:Draft AnnotationStyleEditor example.png

Style editor to configure the annotations.

Usage

  1. Press Draft Annotation style editor button.
  2. Open the combobox, and then choose Add new... to define a new style, or select one of the existing styles.
  3. Adjust the properties of the style, and then press OK when satisfied.

Use the Rename or Delete to rename or delete the active style.

Styles

The annotation styles are saved as dictionaries in the Meta attribute of the document. This attribute is inspected by the annotation style editor when it is opened.

print(App.ActiveDocument.Meta["Draft_Style_Custom"])
{"FontName": "DejaVu Sans", "FontSize": "12.0000 ", "LineSpacing": "1 cm", "ScaleMultiplier": 1.0, "ShowUnit": false, "UnitOverride": "m", "Decimals": 2, "ShowLines": true, "LineWidth": 1, "LineColor": 1095216660480, "ArrowType": 0, "ArrowSize": "5.0000 ", "DimensionOvershoot": "1.0000 ", "ExtensionLines": "5.0000 ", "ExtensionOvershoot": "1.0000 "}

Since the Meta attribute can hold arbitrary information, each style that appears in the style editor is prefixed by Draft_Style_.