Expressions in TechDraw_Annotation's Text property

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
chrili_rakete
Posts: 54
Joined: Thu May 15, 2014 11:51 am

Expressions in TechDraw_Annotation's Text property

Post by chrili_rakete »

I often use annotations in TechDraw to present calculated data of the underlying (parametric) model in my drawings, e.g. area, volume, weight etc.

As the Text property of an annotation is a non-expression-aware list, changing values have to be edited manually. Instead it would be very helpful for me to link the text to expressions. That's why I would like to suggest the implementation of this feature. Thanks in advance!

OS: Ubuntu 20.04 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 2022.111.30764 (Git) AppImage
Build type: Release
Branch: LinkDaily
Hash: ef3092bcbca5475eff4eb7ff7933eb3e9bbbe4b9
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Austria (de_AT)
domad
Veteran
Posts: 2094
Joined: Mon Jun 22, 2020 12:16 pm

Re: Expressions in TechDraw_Annotation's Text property

Post by domad »

chrili_rakete wrote: Wed Jan 12, 2022 8:46 pm I often use annotations in TechDraw to present calculated data of the underlying (parametric) model in my drawings, e.g. area, volume, weight etc.

As the Text property of an annotation is a non-expression-aware list, changing values have to be edited manually. Instead it would be very helpful for me to link the text to expressions. That's why I would like to suggest the implementation of this feature. Thanks in advance!
Hi chrili_rakete, greetings to the community!
Insert a "Balloon" and in the "Text" parameter insert the function to recall the property (Area, Volume, etc.) of the object.
chrili_rakete
Posts: 54
Joined: Thu May 15, 2014 11:51 am

Re: Expressions in TechDraw_Annotation's Text property

Post by chrili_rakete »

Dear domad! Thanks a lot – I did not use Ballon annotations up to now. Though positioning and formatting the Ballon the way I intend to use it seems a bit quirky in the beginning, but I think this shall be (at least) a good workaround for my purposes.

Nevertheless I wonder if also the text of standard annotations could be made "expressionable" with considerable effort – I would appreciate this feature. Thanks & greetings!
domad
Veteran
Posts: 2094
Joined: Mon Jun 22, 2020 12:16 pm

Re: Expressions in TechDraw_Annotation's Text property

Post by domad »

chrili_rakete wrote: Sat Jan 15, 2022 10:14 am .....
Hi chrili_rakete, greetings to the Community!
I am glad that you can take advantage of the suggestion, the Balloon are very flexible, in particular you can use them as an annotation by hiding the lines and possibly the border or setting it with a different geometry etc. , a very important thing: you can move them wherever you like (like the annotations) they will still remain linked to the view (the annotations do not) also by acting on the "Text Wrap Len" parameter you can adjust the text on multiple lines.
Post Reply