For the record: It seems that all names that are identical with units have this "feature". There are quite a few units, including:
- A
- F
- M, m
- N
- S
- ... https://wiki.freecadweb.org/Expressions#Units
Note to self: Do not use single characters as names, many potential clashes!
This has been already discussed: https://tracker.freecadweb.org/view.php?id=3379
Sketcher: "Name (optional)" field accepts any character
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Sketcher: "Name (optional)" field accepts any character
I see, I did not think about the different kinds of usages. I don't have the competence how this can be solved in a reasonable way. A warning message if the names clashes with a unit, etc. may an option. Something likekisolre wrote: ↑Fri Jan 15, 2021 12:36 pmThat is the point. Legal for what? If you dont want to use it in expressions any name should be legal. If you want to use it in expressions - you are expected to nave an idea how those work and what are their limitations. So should we limit all other usage scenarios just because one of them has limitations?
"Your name clashes with a reserved word. The name cannot be referenced in an expression. See <link to documentation>"
Perhaps this warning message could be generated on-the-fly right under the input field.
Re: Sketcher: "Name (optional)" field accepts any character
Thanks for the feedback Chris.