Document & Visualize forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Property expression are rounding to 2 decimal places???

gdford
Booster

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!!

Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram
7 REPLIES 7

poco2013
Advisor

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

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 25

gdford
Booster

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.

Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram

using "STRTONUM" and setting working units "Numbers without Units" to 3 decimals I get 134.567. Are you setting units in the right place?

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 25

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.

Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram

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.

Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram

JaseBee
Enthusiast

+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...

AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram

JaseBee
Enthusiast

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?

AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram

Start a new conversation!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!