Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.

Property expression are rounding to 2 decimal places???

gdford
Advisor

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-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
7 REPLIES 7
poco2013
Mentor

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 11 - Visual Studio 2022; ArchiCAD 27
gdford
Advisor

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-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000

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 11 - Visual Studio 2022; ArchiCAD 27
JaseBee
Advocate

+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

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-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
JaseBee
Advocate

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

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-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000