Using Expressions to Calculate the Maximum Number of Occupants Automatically

Craig Boyer
Graphisoft Alumni
Graphisoft Alumni
With the introduction of expressions in ARCHICAD 22 users can extract and manipulate information from the model. Follow the steps below to learn how automatically calculate the maximum number of occupants per zone and display it in the zone stamp.
wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.51.06-PM-1.png

Creating Groups, Properties & Expressions

1. Go to Options > Property Manager... to open the Property Manager dialogue box.

2. Click the New button to the New Property / Group dialogue box.

wp-content_uploads_2019_03_Screen-Shot-2019-03-01-at-3.11.10-PM.png

3. In the New Property / Group dialogue box, select Group, enter the Group Name and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-2.49.41-PM.png

4. Click the New button to open the New Property / Group dialogue box.

5. In the New Property / Group dialogue box, select Property, enter "Occupancy Type" for Property Name, set Add to Group to the group that was just created and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-2.52.44-PM.png

6. Select the Occupancy Type property and under the Value Definition tab make sure that Data Type is set to Option Set and Default Value is set to Value. Once Value is selected, the Options Setup dialogue will automatically open. This dialogue box can also be accessed by clicking the Options Setup... button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-2.54.09-PM.png

7. Click the Add button to create a list of occupancy types. The name should include a descriptor (ex. Library), followed by a separating character (ex. | or /), followed by the area required in the space per person. Once all values have been created, click OK.

wp-content_uploads_2016_06_Info_18x18.png NOTE: By including the area per person in the occupancy type title, the total occupants per room can be automatically calculated whenever the occupancy type changes. The separating character will allow the title to be split and the numeric data extracted and applied to later formulas. Keep in mind that the values in this example are in imperial units. The numbers in the titles below denote the number of square feet needed per occupant in the space. For metric, substitute square meters. Make sure that whatever unit is chosen remains constant throughout.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.03.25-PM.png

8. Back in the Property Manager dialogue box, click the New button to open the New Property / Group dialogue box.

9. In the New Property / Group dialogue box, select Property, enter "Occupant Load" for Property Name, set Add to Group to the same group as in previous steps and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.37.08-PM.png

10. Select the newly created Occupancy Load property and under the Value Definition tab make sure that Data Type is set to Integer and Default Value is set to Expression. Once Expression is selected, the Expression Editor dialogue will automatically open. This dialogue box can also be accessed by clicking the Add... button.

wp-content_uploads_2016_06_Info_18x18.png NOTE: The expression in this property will extract the numeric value from the title of Occupancy Type property.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.52.32-PM.png

11. In the Expression Editor dialogue box, click the Operators & Functions button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-01-at-3.27.55-PM.png

12. In the pull down menu, under Data conversion, select Number from string [ STRTONUM ] and click Add.

wp-content_uploads_2016_06_Info_18x18.png NOTE: This function converts all text to numeric data. This numeric information can then be used in equations. All numbers in fields that also include text will be considered text until this function is used. In this case, the area requirements in the occupancy type titles will be converted to usable numbers.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.53.16-PM.png

13. Select "Text" (including the quotation marks) and click the Operators & Functions button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.53.22-PM.png

14. In the pull down menu, under Text editing, select Split string to right [ SPLITRIGHT ] and click Add.

wp-content_uploads_2016_06_Info_18x18.png NOTE: The text in the Occupancy Type property value options must be removed before the numeric data can be converted to usable numbers. The SPLITRIGHT command discards the first text part of the title.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.53.40-PM.png

15. Select "Text" (including the quotation marks) and click the Parameters & Properties... button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.53.57-PM.png

16. In the pulldown menu, under the Properties > Zones tab, select Occupancy Type and click Add.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.43.27-PM.png

17. Select and delete Delimiter (DO NOT include the quotation marks) and enter the trimming character and the space that follows it "| ".

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.54.52-PM.png

18. Select and delete PartIndex, enter "2" and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.55.06-PM.png

19. Back in the Property Manager dialogue box, click the New button to open the New Property / Group dialogue box.

20. In the New Property / Group dialogue box, select Property, enter "Occupants" for Property Name, set Add to Group to the same group as in previous steps and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.57.27-PM.png

21. Select the newly created Occupants property and under the Value Definition tab make sure that Data Type is set to Integer and Default Value is set to Expression. Once Expression is selected, the Expression Editor dialogue will automatically open. This dialogue box can also be accessed by clicking the Add... button.

wp-content_uploads_2016_06_Info_18x18.png NOTE: The expression in this property will take the numeric data extracted in the previous property and apply it to the area of the zone to determine the allowable number of occupants.

22. In the Expression Editor dialogue box, click the Operators & Functions button.

23. In the pull down menu, under Mathematical functions, select Round up [ ROUNDUP ] and click Add.

wp-content_uploads_2016_06_Info_18x18.png NOTE: This will take the resulting value and round it up to the nearest integer.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.58.08-PM.png

24.  Select Number and click the Parameters & Properties... button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.59.03-PM.png

25. In the pulldown menu, under the Zone tab, select Measured Area and click Add.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.59.17-PM-1.png

26. Add a space after "Measured Area" and click the Operators & Functions button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-4.00.24-PM.png

27. In the pull down menu, under Operators, select Divide [ / ] and click Add.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-4.02.33-PM.png

28. Enter the number 1 after the division sign but before the comma and click the Units button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-4.01.22-PM.png

29. In the pull down menu, under Area, select Square feet [ ft2 ] and click Add.

wp-content_uploads_2016_06_Info_18x18.png NOTE: This unit should match the unit of the numeric value in the Occupancy Type title.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-4.01.32-PM.png

30. Add parentheses before "Measured Area" and after "1 ft2" and add a space after the second. Click the Operators & Functions button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-10.24.17-AM.png

31. In the pull down menu, under Operators, select Divide [ / ] and click Add.

32. Add a space after the division sign but before the comma and click the Parameters & Properties... button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-10.32.27-AM.png

33. In the pulldown menu, under the Properties > Zones tab, select Occupancy Load and click Add.

wp-content_uploads_2016_06_Info_18x18.png NOTE: This will divide the area of the space by the area need per occupant.
wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-10.26.34-AM.png

34. Select and delete NumberOfDigits, enter the number 0 and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-4.05.14-PM.png

35. Select the 3 newly created properties, under the Availability for Classifications tab select Custom and click Edit...

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.35.45-PM.png

36. In the Availability dialogue box select Space and click OK.

wp-content_uploads_2016_06_Info_18x18.png NOTE: This will allow the property being created to be used with zones in the project. If a different classification system exists in the file, choose the classification that is used for zones.
wp-content_uploads_2019_03_Screen-Shot-2019-03-05-at-3.06.15-PM-1.png

37. Click OK in the Property Manager dialogue box to exit.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.13.54-PM.png

Applying Expressions to Zones

The example below uses the Zone Stamp 01 22. If another stamp is used steps 1-4 will remain the same but ability for the zone to display property information might not exist

1. Open the floor plan.

2. Select a zone and open the Zone Selection Settings dialogue box.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.57.08-PM.png

3. Under Classifications and Properties, navigate to the Classifications section. Make sure that the classification is set to the one associated with the expression properties created earlier.

wp-content_uploads_2016_06_Info_18x18.png NOTE: In this example, the Space classification needs to be enabled for the 3 properties to appear.
wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.46.41-PM.png

4.Under the Zones section, set the Occupancy Type for the selected zone.

wp-content_uploads_2016_06_Info_18x18.png NOTE: If left undefined, the Occupants will not be calculated.
wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-2.26.29-PM.png

5. Under the Settings tab, navigate to the Content section and click the + button.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.47.35-PM.png

6. Click on the new field entitled "** Empty Row" and choose Measured Area. Click the + button to add another field.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.48.04-PM.png
wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.47.43-PM.png

7. Click on the new field entitled "** Empty Row" and choose Classification and Properties.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.48.16-PM.png

8. Under the Settings tab, navigate to the Classifications and Properties. Set the Select Data field to Create Sorting. Set the Display Data by field to Parameter Name and Value. Select row 1 and click the arrow.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.48.24-PM.png

9. Select the Occupants property and click OK.

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.49.58-PM.png

10. The maximum number of occupants will now appear in the zone stamp.

wp-content_uploads_2016_06_Info_18x18.png NOTE: If the Occupancy Type is changed this value will update.

 

wp-content_uploads_2019_03_Screen-Shot-2019-03-07-at-1.51.06-PM.png

11. Repeat the process for other zones in the project.

wp-content_uploads_2016_06_Info_18x18.png NOTE: Once the zones have all been classified and their Occupancy Types chosen, this information can be scheduled.

 

Comments
David Shorter
Advisor

perhaps the Option set could be created from the Zone Categories in the future

Martin Jules
Mentor

Interesting!

 

I will check it out compared to the requirements of some local building codes.

David Shorter
Advisor

image.jpeg

We can get a total but how to add some text (or create a unit) to the total so its clear what the total refers to.

For example 47 occupants. (the schedule area says 141.93 m2 but the occupants have no units)

It seems to me that the whole issue with Expressions is that we can't create new units. This wasn't the case with the "OLD" Properties. Perhaps I have missed something.

Martin Jules
Mentor

@David Shorter I am not sure the number of occupants needs to be expressed in some units. To calculate occupancy load, we can directly refer to our respective local building code(s) to check it out compared to that of the Archicad zone properties.

David Shorter
Advisor

@Martin Jules There are a number of reasons why totals need to be expressed with specific units and this should be a basic function.  

Here are two examples.

image.jpeg

The above is a Farm plan with a layout of the paddocks.

The paddock areas are measured in hectares and are scheduled as such

BUT its impossible to show the total in Ha

 

plantingSchedule.jpg

Here is another example where I cant show the total as bricks

or define the total as blocks

bricks_blocks.jpg

Its really silly to have export the schedules to Excel just to define the 'units'

  

Barry Kelly
Moderator

I agree it would be nice to have the units in the totals, but you heading does say what that column is.

 

Barry.

David Shorter
Advisor

@Barry Kelly With a long schedule you may not see the top and why then be able to put M2 or m3 against the total and not the more obscure units. With the OLD properties this easy as units were applied at the end of the calculation just like Excel.

Barry Kelly
Moderator

You can freeze the header in 25.

 

BarryKelly_0-1647930928059.png

 

I'm not sure how many versions back that can be done or if it is just new in 25.

This is only on-screen in Archicad.

In the layouts you can split the schedules across multiple pages and i am pretty sure that duplicates the headers.

 

Barry.

David Shorter
Advisor

@Barry Kelly OK but its a workaround for something which should be accessible by default.

Unfortunately with the complications of having to specify and use units during the calculation I suspect it almost impossible. 

Martin Jules
Mentor

@David Shorter I will check it out again this week-end and will let you know.

Still looking?

Browse more articles

Back to articles

See latest solutions

Accepted solutions

Start a new discussion!