how to force scientific notation for a property

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: how to force scientific notation for a property

Post by uwestoehr »

wmayer wrote: Sat Jul 30, 2022 6:18 pm
Do you mean this workaround?:
No, but this is an alternative way.
And works well. Therefore implemented: git commit 00f13607
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: how to force scientific notation for a property

Post by uwestoehr »

uwestoehr wrote: Sat Jul 30, 2022 5:16 pm But this was my question:
- in C++ I can change the property and to keep backwards compatibility, I use handleChangedPropertyType .
- for Python I need the same an need to know what dies the same as handleChangedPropertyType in Python.
Background: apart from this problem here, I want to implement for FEM to use the different properties we already have (App:PropertyForce etc.).
I asked Bernd who pointed me to
https://github.com/FreeCAD/FreeCAD/blob ... msh.py#L81

So we store the property's content, remove it and create it new.
(The funny thing is that I once implemented this method and forgot about it :oops: )
Post Reply