I am trying out some of the units mentioned on the Expressions page in the Wiki.
Some of them are not recognized in a spreadsheet, f.e. ml and Hz.
Is the implementation incomplete or am I missing something.
Units on Expressions page not supported?
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Units on Expressions page not supported?
Code: Select all
OS: Linux Mint 20.2 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git) AppImage
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: French/France (fr_FR)
- Attachments
-
- Capture du 2021-10-27 12-23-16.png (31.7 KiB) Viewed 456 times
-
- Capture du 2021-10-27 12-23-47.png (38.37 KiB) Viewed 456 times
-
- unit in spreadsheet.FCStd
- (2.77 KiB) Downloaded 6 times
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Units on Expressions page not supported?
I recall seeing a commit where some new units were added. Perhaps something additional needs to be done for them to work in spreadsheets. Or this might be unrelated.
Re: Units on Expressions page not supported?
Looking around in the code a bit I think (guess) that only the units in src/App/lex.ExpressionParser.c work. In other files more units are mentioned which may have confused the author of the Units paragraph.
@Shalmeneser Thanks for checking and the file. I'll use it when I clean up the Wiki page.
Re: Units on Expressions page not supported?
Some things are strange about the available units:
Recognized:
A (Ampere)
VA (VoltAmpere)
VAs (VoltAmpereSecond = Joule)
Not recognized:
V (Volt)
Recognized:
A (Ampere)
VA (VoltAmpere)
VAs (VoltAmpereSecond = Joule)
Not recognized:
V (Volt)