Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Zone Area Calculation

Anonymous
Not applicable
Hi,
I tried to use AC22 expression function to do a zone area calculation but I didn't success. Hoping someone can solve my question.

If I have zone A (50m2) and zone B (100m2), zone A need to be divided by zone B like this (50/100 x 100=50%). So how can I get this done?

Many Thanks.
7 REPLIES 7
Barry Kelly
Moderator
Unfortunately zone A has no idea about zone B so can't compare sizes.

There is a similar post here ... https://archicad-talk.graphisoft.com/viewtopic.php?f=34&t=61912

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
No~~~~~~~~~~~~~~~!!
Thanks Barry.
poco2013
Mentor
You may be under a misunderstanding:

expressions can only address properties for one element at a time. You can not introduce areas for two different zones in one expression since the error control feature will detect that for any area in which the expression is being evaluate, that one of the areas will not be valid for that element so the whole expression will be invalid. This is because properties contain a GUID which prevents name collisions between similar names of different elements.

There is a workaround but too cumbersome - IMNOHO.
Basically you need three expressions one each to return the area of each zone. This solves the problem of having more than one element property type in one expression. Then a third expression to do the calculation.

Zone cal for each zone to return its area;

IF ( {Property:General Parameters/Element ID} = "ZONE-01", {Property:Zone/Calculated Area}, 0 ft2 )
IF ( {Property:General Parameters/Element ID} = "ZONE-02", {Property:Zone/Calculated Area}, 0 ft2 )
returns area - data type

Final cal:

CONCAT ( STR ( ( {Property:expressions/Zone02} / {Property:expressions/Zone01} * 100 ), 0 ), "%" )
returns string

The expression classifications must match the elements. This only works if the expression are only applicable (limited) to zones 1 &2 which you can do via custom classifications.

As I said somewhat unreasonable limitation. better to just get out your calculator and pencil?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Anonymous
Not applicable
Hi poco2013, thanks for providing me with the expression. I will test them later.
I agree with what you said, it is too cumbersome. I'll continue to use Excel to do my area schedule.
Anonymous
Not applicable
I was initially very happy to hear that users will be able to do math operations is ArchiCAD. First blow was finding out that it does not work like Excel formulas. Second blow was finding out that you can't calculate between different elements, as described above. So even though it is a move in a good direction, it is not fully useful.

However, there is a workaround for calculations involving site area. Enter the site area in project info. Then create an expression where you use string to number conversion because ArchiCAD does not treat site area in project info as number, but as text. Since the site area should not change, you should only have to enter it once.

https://helpcenter.graphisoft.com/guides/archicad-22/archicad-22-reference-guide/functions-in-expres...
Barry Kelly
Moderator
DavorP wrote:
However, there is a workaround for calculations involving site area. Enter the site area in project info. Then create an expression where you use string to number conversion because ArchiCAD does not treat site area in project info as number, but as text. Since the site area should not change, you should only have to enter it once.
You can do the same to compare zone areas to an overall building area.
Or for any element value that you want to compare to a 'master' value.

An alternative to using the project info (and having to convert to a numeric value) is to create a 'value' property with the master figure you want.
Then associate that property with the element type you are trying to calculate.
If you want to change the master figure you just change it in the Property Manager.
Unfortunately the master property can be changed in each element - it can't be locked - we have asked for this option.
If it is changed you will see the symbol changes to a custom value and it is easy to change it back to default.


I think this is a better option, especially when we can get Graphisoft to allow us to lock a property.
I don't think there will be too much danger in users changing the default in each zone (or other elements) though, so it should be fairly safe if unlocked.
When you are amending the 'master' value in the property manager, you will know if an element has been changed from default.


Remember, you can't lock the project info either.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JSN
Enthusiast
Thx for providing this workaround - however, I could not get this to work - I can inherit the Areas of Zone 1 and 2, but only if I am establishing 2 new Properties and then expression nr. 3 is not working as I cannot access the values from zones from another element - but maybe I just don't get the essential trick so maybe you can provide more information (maybe screens?) on the following part of expression nr- 3

>>> ( {Property:expressions/Zone02} / {Property:expressions/Zone01}

In my created schedule other element's values are always 0 (because that's what expressions 1 and 2 are returning if the zone ID is not matching)

Appreciate any support - thx
(Actually I don't want the ratio of my zones but an auto-sum of specific zones which belong together to one department and it would be great to have this "DepartmentArea" beside the individual "Calculated Area, Measured Area ..." as a Property in all of those zones - so if there is another (easier) solution on that I am open to any support - btw, using the International Version which does not have the TOP stamp feature.

Best,

poco2013 wrote:
You may be under a misunderstanding:

expressions can only address properties for one element at a time. You can not introduce areas for two different zones in one expression since the error control feature will detect that for any area in which the expression is being evaluate, that one of the areas will not be valid for that element so the whole expression will be invalid. This is because properties contain a GUID which prevents name collisions between similar names of different elements.

There is a workaround but too cumbersome - IMNOHO.
Basically you need three expressions one each to return the area of each zone. This solves the problem of having more than one element property type in one expression. Then a third expression to do the calculation.

Zone cal for each zone to return its area;

IF ( {Property:General Parameters/Element ID} = "ZONE-01", {Property:Zone/Calculated Area}, 0 ft2 )
IF ( {Property:General Parameters/Element ID} = "ZONE-02", {Property:Zone/Calculated Area}, 0 ft2 )
returns area - data type

Final cal:

CONCAT ( STR ( ( {Property:expressions/Zone02} / {Property:expressions/Zone01} * 100 ), 0 ), "%" )
returns string

The expression classifications must match the elements. This only works if the expression are only applicable (limited) to zones 1 &2 which you can do via custom classifications.

As I said somewhat unreasonable limitation. better to just get out your calculator and pencil?