Sketcher is allergic to the letter l
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!
Sketcher is allergic to the letter l
I have Freecad 18.4
You can see all from picture or attached file. The dimension 25 has name l. I want to write expression at dimension 10.06.
I recieved error message Failed to write expression. When I change the name to ll, all is OK.
You can see all from picture or attached file. The dimension 25 has name l. I want to write expression at dimension 10.06.
I recieved error message Failed to write expression. When I change the name to ll, all is OK.
- Attachments
-
- sketcher.FCStd
- (5.45 KiB) Downloaded 20 times
-
- sketcher.jpg (47.21 KiB) Viewed 1097 times
Re: Sketcher is allergic to the letter l
Hi,
'l' is unit for lumen, thus it breaks expression parsing when you try to use it.
This is known, and true for every string representing a unit (A, V, rad, deg, ...).
There is a ticket to improve the situation by preventing the user to do so (or warning him/her).
EDIT : JFYI issue #3379
'l' is unit for lumen, thus it breaks expression parsing when you try to use it.
This is known, and true for every string representing a unit (A, V, rad, deg, ...).
There is a ticket to improve the situation by preventing the user to do so (or warning him/her).
EDIT : JFYI issue #3379
Re: Sketcher is allergic to the letter l
Thanks a lot. It will be solved in version 19
Re: Sketcher is allergic to the letter l
Moved to Help subforum
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Sketcher is allergic to the letter l
Is it not for "liter"?
Expressions
Expressions wrote: If you have a variable with a name of a unit you must put the variable into << >> to prevent that it will be recognized as unit. For example if you have the dimension 'Sketch.Constraints.A' it would be recognized as unit ampere. Therefore you must write it in the expression as 'Sketch.Constraints.<<A>>'.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Sketcher is allergic to the letter l
These are all just repairs.
Wouldn't be better to rewrite the parser ?
Every unit is preceded by a space, variable is preceded by dot.
If we just fix everything, then Freecad will never be good software.
Wouldn't be better to rewrite the parser ?
Every unit is preceded by a space, variable is preceded by dot.
If we just fix everything, then Freecad will never be good software.
Re: Sketcher is allergic to the letter l
vocx wrote: ↑Thu Nov 21, 2019 5:04 pm Expressions
Expressions wrote:
If you have a variable with a name of a unit you must put the variable into << >> to prevent that it will be recognized as unit. For example if you have the dimension 'Sketch.Constraints.A' it would be recognized as unit ampere. Therefore you must write it in the expression as 'Sketch.Constraints.<<A>>'.
Seems to be broken
tested version:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18782 (Git)
Build type: Release
Branch: master
Hash: 84752715e829ed7fec40453a0714513b36d637a9
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
workflow:
- load - execute
Code: Select all
App.ActiveDocument.Sketch.setExpression('Constraints[9]', u'<<A>>')
IndexError: Array out of bound: 9, 9 In unsigned __int64 __cdecl App::ObjectIdentifier::Component::getIndex(unsigned __int64) const in src\App\ObjectIdentifier.cpp:597