FreeCAD Logo FreeCAD 1.0
  • English Afrikaans Arabic Belarusian Catalan Czech German Greek Spanish Spanish Basque Finnish Filipino French Galician Croatian Hungarian Indonesian Italian Japanese Kabyle Korean Lithuanian Dutch Norwegian Bokmal Polish Portuguese Portuguese Romanian Russian Slovak Slovenian Serbian Swedish Turkish Ukrainian Valencian Vietnamese Chinese Chinese
  • Features
  • Download
  • Blog
  • Documentation
    Documentation index Getting started Users documentation The FreeCAD manual Workbenches documentation Python coding documentation C++ coding documentation Tutorials Frequently asked questions Privacy policy About FreeCAD
  • Contribute
    How to help Sponsor Report a bug Make a pull request Jobs and funding Contribution guidelines Developers handbook Translations
  • Community
    Code of conduct Forum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Calendar
  • ♥ Donate

Donate

$
SEPA Information
Please set up your SEPA bank transfer to:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Bank agency: BNP Paribas Fortis
Address: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Label
Move
Draft

Draft AnnotationStyleEditor

Menu location
Annotation → Annotation Styles
Manage → Annotation Styles
Workbenches
Draft, BIM
Default shortcut
None
Introduced in version
0.19
See also
Draft Text, Draft Label, Draft Dimension

Description

The Draft AnnotationStyleEditor command allows you to define styles that affect the visual properties of annotation-like objects, such as those create by the Draft Text, Draft Dimension and Draft Label commands.

The Annotation Styles Editor dialog box (version 1.1 layout)

Usage

  1. There are several ways to invoke the command:
    • Draft: Press the Annotation Styles button.
    • Draft: Select the Annotation → Annotation Styles option from the menu.
    • BIM: Select the Manage → Annotation Styles option from the menu.
  2. The Annotation Styles Editor dialog box opens.
  3. Select a style from the Style Name dropdown list, or choose Add new… to define a new style.
  4. Optionally adjust the properties of the style.
  5. Optionally press the Rename button to rename the style.
  6. Optionally press the Delete button to delete the style.
  7. Optionally press the button to import all styles from a .json file. This will overwrite existing styles with the same name.
  8. Optionally press the button to export all styles to a .json file.
  9. Press the OK button to close the dialog box and finish the command.

Apply

To apply an annotation style change the ViewAnnotation Style property of annotation objects. This property can be found on the View tab of the Property View.

Selecting an annotation style

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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

Each style that appears in the editor is internally saved with the style name prefixed by Draft_Style_. This will prevent name clashes with other keys that may be saved in Meta, which can hold arbitrary information.

You may define any new style by adding the necessary information to a key that starts with Draft_Style_. The corresponding value of this key must be a dictionary serialized using json.

import json

meta = App.ActiveDocument.Meta
props = {"ArrowSizeStart": 7.0, "ArrowSizeEnd": 7.0, "LineWidth": 6}
meta["Draft_Style_Thick lines"] = json.dumps(props)
App.ActiveDocument.Meta = meta

The properties not entered will be filled automatically when this style is selected in the style editor and the OK button is pressed.

In a similar way, any serialized dictionary can be unpacked for edition.

import json

meta = App.ActiveDocument.Meta
props = json.loads(meta["Draft_Style_Text red"])

Where props may have this value:

{"ArrowSizeStart": 2.0, "ArrowSizeEnd": 2.0, "ArrowTypeStart": 0, "ArrowTypeEnd": 0, "Decimals": 2, "DimOvershoot": 4.0, "ExtLines": 0.0, "ExtOvershoot": 4.0, "FontName": "DejaVu Sans", "FontSize": 10.0, "LineColor": 255, "LineSpacing": 1.0, "LineWidth": 2, "ScaleMultiplier": 1.0, "ShowLine": True, "ShowUnit": False, "TextColor": 4278190335, "TextSpacing": 3.0, "UnitOverride": ""}

The properties must have the following types:

Strings:

props = {
    "FontName": "DejaVu Sans",
    "UnitOverride": ""
}

Floats (must be supplied with a decimal point):

props = {
    "ArrowSizeStart": 2.0,
    "ArrowSizeEnd": 2.0,
    "DimOvershoot": 4.0,
    "ExtLines": 0.0,
    "ExtOvershoot": 4.0
    "FontSize": 10.0,
    "LineSpacing": 1.0,
    "ScaleMultiplier": 1.0,
    "TextSpacing": 3.0
}

Integers:

props = {
    "ArrowTypeStart": 0,
    "ArrowTypeEnd": 0,
    "Decimals": 2,
    "LineColor": 255,
    "LineWidth": 2,
    "TextColor": 4278190335
}

ArrowTypeStart and ArrowTypeEnd are enumerators. LineColor and TextColor correspond to 32-bit integers, from which the individual RGBA values can be extracted.

Booleans:

props = {
    "ShowLine": True,
    "ShowUnit": False
}


Label
Move
Draft

This page is retrieved from https://wiki.freecad.org/Draft_AnnotationStyleEditor

Get in touch!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© The FreeCAD Team. Homepage image credits (top to bottom): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

This project is supported by: , KiCad Services Corp. and other sponsors

GitHubImprove this page on GitHub