[SOLVED] - Trouble referring expressions

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

[SOLVED] - Trouble referring expressions

Post by Lonfor »

I renamed an angular constraint in order reuse it in other sketches. I followed the instructions at https://wiki.freecadweb.org/Expressions but it looks like I have a comprehension problem or there is something wrong with the notation.
What I need is to link, or reference, the expression named "60grados" in the same sketch, in other features in the same file, and also in other files.
Can you tell me please what is the right notation for to do those three tasks?

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.1)
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * CurvedShapes 1.0.4
  * Manipulator 1.4.9
  * Help 1.0.3
  * Assembly3 0.11.4
  * Curves 0.6.1
  * toSketch 1.0.1
  * QuickMeasure 2022.10.28
  * A2plus 0.4.60b
  * Assembly4 0.12.4
  * offline-documentation 1.0.0-alpha
  * fasteners 0.4.22
Attachments
1.png
1.png (281.1 KiB) Viewed 279 times
Cropped - Expressions.jpeg
Cropped - Expressions.jpeg (125.25 KiB) Viewed 279 times
Cropped - Expressions2.jpeg
Cropped - Expressions2.jpeg (398.29 KiB) Viewed 279 times
Last edited by Lonfor on Mon Nov 28, 2022 7:48 am, edited 1 time in total.
chrisb
Veteran
Posts: 53935
Joined: Tue Mar 17, 2015 9:14 am

Re: Trouble referring expressions

Post by chrisb »

The name must not start with a digit.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: Trouble referring expressions

Post by Lonfor »

That did the trick.
Also I am noticing that in the Expression Editor dialog, the name of the external file cannot contain spaces, so "caja v2" must be inputed in the dialog as "caja_v2".
Thanks for your help. It is much appreciated. :D
Attachments
1.png
1.png (134.71 KiB) Viewed 249 times
2.png
2.png (81.41 KiB) Viewed 249 times
chrisb
Veteran
Posts: 53935
Joined: Tue Mar 17, 2015 9:14 am

Re: [SOLVED] - Trouble referring expressions

Post by chrisb »

For filenames containing spaces - which I recommend to never use - can be included in expressions by enclosing the filename in double angled brackets, like so:
<<caja v2>>#Sketch. ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply