2011-03-22 21:04 UTC
When the FilerStyle of a TextBox is set to Numeric or Angle Units Filter, the TextBox does 2 things :
- filtering invalid caracters
- converting values onto the default numeric format (set by _UNITS) when leaving it (OnKillFocus)
So FilterStyle automatically converts the value OnKillFocus, with something like :
(distof .. (getvar "LUNITS")) and (angtof .. (getvar "AUNITS"))
I don't know if there are reason to this 2nd behavior, but I'm not sure it's relevant.
In ACad you can write "1/8" even if your units system is set to Decimal (or you can write "0.12r" even if .. Degree), and I think that if you write "1/8" you don't want to recover "0.125"..
Personnaly I don't use it for this reason. I replace it by a OnKillFocus function that simply erase the string of the TextBox if the value is incorrect according to the general format, indeed if (distof .. (getvar "LUNITS")) = 0 (so on the other hand there is no more "0"...)
So, I was wondering if this remark should be a feature request or not ?
- filtering invalid caracters
- converting values onto the default numeric format (set by _UNITS) when leaving it (OnKillFocus)
So FilterStyle automatically converts the value OnKillFocus, with something like :
(distof .. (getvar "LUNITS")) and (angtof .. (getvar "AUNITS"))
I don't know if there are reason to this 2nd behavior, but I'm not sure it's relevant.
In ACad you can write "1/8" even if your units system is set to Decimal (or you can write "0.12r" even if .. Degree), and I think that if you write "1/8" you don't want to recover "0.125"..
Personnaly I don't use it for this reason. I replace it by a OnKillFocus function that simply erase the string of the TextBox if the value is incorrect according to the general format, indeed if (distof .. (getvar "LUNITS")) = 0 (so on the other hand there is no more "0"...)
So, I was wondering if this remark should be a feature request or not ?