We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-10-14 11:54 PM
I have the project calculation units set to decimal inches with three decimal places.
When i schedule the length of a beam (Beam Left), I get a LENGTH like this --> 133.247"
I created a custom property expression to convert this LENGTH to a NUMBER.
The expression looks like ---> Beam Left / 1 in
When i schedule this property I get --> 133.25
I do not want 2 decimal places i want three decimal places.
Can i control this, or is this behavior baked into Archicad?
I can think of a work around, but what i have here should work.
Anyone have thoughts on this?
Thanks in advance!!
2021-10-15 01:19 AM
I believe that when you convert from a length to a number, that it no longer has a unit. So-- under working units set "numbers without units" to three decimals
2021-10-15 01:44 AM
ok - I have run a few more test.
When ever i convert a decimal string such as ---> "134.567" into a number
I always end up with 134.58
I am not happy.
2021-10-15 02:06 AM
using "STRTONUM" and setting working units "Numbers without Units" to 3 decimals I get 134.567. Are you setting units in the right place?
2021-10-15 02:51 AM
+1 to Gerry's response, that's the only way a property with number data type responds to change of decimals for me too. Shame because it could be set differently for different users which means differing outputs upon publishing...
2021-10-15 05:14 AM
STRTONUM is what I was using.
I have not looked at what working units are set to. I never considered that working units would affect a calculation in an expression. I wouldn't expect that the working units setting would be saved as part of the view settings for a schedule, but I have never tested. For the view that opens the schedule I set the dim setting to decimal inch with 3 decimal places. And I set the calculation unit setting to decimal inches to 3 decimal places. Surely working unit settings do not affect property expression calculations.
It will be a bit before I can test this.
2021-10-15 06:32 AM
Just had a thought, tried it and it worked.
Although the "STRTONUM" rounds to the project unit, if you convert back to a string "STR" you can specify the number of decimals you want and it restores the unrounded number.
Not sure if this helps though as your originally converting from a string... presumably for tallying in a schedule?
2021-10-15 11:30 AM
ok - I tested and sure enough Working Units affects Schedules!
.... and as i suspected but don't remember ever testing, Working Units Settings are NOT saved with View Settings.
I have to admit that it seems very flawed that working units should affect the accuracy of schedules! I do seem to remember that I believe working units are saved when project is saved and or project is teamworked.