cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Achille Pavlidis
Advocate

Problem when using expressions to calculate the number of occupants automatically

Hi,

I;m struggling with the following: I use follow the directions of this page: https://helpcenter.graphisoft.com/knowledgebase/86867/ to calculate the number of occupants. The problem I face is when I have a parameter of occupancy that is not an integer, like say 2.6 or 3.2 those number get rounded up resulting in erroneous results. The expression used is
STRTONUM ( SPLITRIGHT ( {Property:ZONES/Occupancy type}, "| ", 2 ) )

Why is this happening? Does the roundup function in the Occupants affect also the Occupant load value?
Mac OS 26.1 | AC 29.0.2 INT 3200 FULL
1 Solution

Accepted Solutions
runxel
Moderator
Be sure that the "occupants load" number is a real, natural number (float), and not an integer; this is to be set in the property's value type.
Then everything should work fine.

I am not aware what the decimal seperator in Greece is. In Germany it's the comma.
You'll need to have the number in "occupancy type" be in the same format as per your PC's settings.

Lastly I would rather "ROUNDDOWN" than up... since rounding up makes no sense – if there is not enough space left you can't cram more people in, right?!
Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

Go to post

2 Replies 2
runxel
Moderator
Be sure that the "occupants load" number is a real, natural number (float), and not an integer; this is to be set in the property's value type.
Then everything should work fine.

I am not aware what the decimal seperator in Greece is. In Germany it's the comma.
You'll need to have the number in "occupancy type" be in the same format as per your PC's settings.

Lastly I would rather "ROUNDDOWN" than up... since rounding up makes no sense – if there is not enough space left you can't cram more people in, right?!
Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Achille Pavlidis
Advocate
Thanks @runxel.

Actually I used "ROUNDUP" because I'm calculating the maximum number of people that can fit in a given space, according to the fire standards
Mac OS 26.1 | AC 29.0.2 INT 3200 FULL

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!