BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

PROPERTIES: What is the scope of variables?

Aurasphere
Advocate

I have areas generated by different zones/categories but they need to interact with one another

1 group of zones sums the gross site area

2nd group adds up the site contacting areas

 

I need the sum of Group 1 to be divided by Group 2

 

However the scope is not clear and does not work if I apply normal programming to it

Here I am extracting the site areas into the variable SITE:Gross Area

 

Aurasphere_1-1707473951429.png

 

Here I am dividing site area by the floor areas (temporarily using a type in value)

 

Aurasphere_4-1707474095941.png

 

I simply need an overall calculation of GFA_FSR / Site: Gross Area

How is such a basic thing achieved?

 

 

Mark Wesse
AC26 | Win10 | Since v6.5r
Architerion - Architectural Systems Developer
Aurasphere - Acoustics
Building Biology - Human Compatible Architecture
"--- Every time...do it better ---"

8 REPLIES 8
poco2013
Mentor

FYI: Expressions can only Operate on the Properties for the Element to which they are attached. They can not address multiple elements and there is no global variable to store data from expressions. The operation that you are attempting is easily handled by a Python script. There are several examples of such on this forum if you do a search.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

RE: Globals etc.

It is horrifying to me that, when I was first into computer, Amiga had an OS implemented scripting (Arexx) that was system wide, nearly all programs had it build in we had, shock horror IAP (Inter Application) and IPC (Inter process) communications. Need macros etc, simple, add a menu, attach script away you. You want your database to talk to a paint program...not a problem at all...easy. Even early nineties, large programs like Corel Draw had a pretty much full implementation of VBS. Sure nowhere near as elegant but got the job done.

Fast forward 30 years...and still struggling to get basic stuff like FSR etc without having to learn yet another language.

Cmon GS...it should not be this hard especially in this day and age. Im reasonable with python but what I have done so far is kludgy and as explained in other posts...you can even get to a lot of stuff...eg remote switching of MVO

When is there going to be global scoping and active data types available to GDL or autotexts ie AutoVar1 * AutoVar2 

 

Without a robust and consistent framework...will be left far behind. I remember when I first started using revit and saw how you could export an interactive schedule, bulk manage in Excel and then reimport...hmm that was 2009 I think. Only just getting limited important functionality in AC now.

I love archicad but havent stuff this unfriendly (even the datatype semantics) makes it hard for decent users to contribute.

Cheers

Mark Wesse
AC26 | Win10 | Since v6.5r
Architerion - Architectural Systems Developer
Aurasphere - Acoustics
Building Biology - Human Compatible Architecture
"--- Every time...do it better ---"

@poco2013 

Then what is the nature of multiple expressions? ie do they share scope? Ultimately there is only one output from the property

Mark Wesse
AC26 | Win10 | Since v6.5r
Architerion - Architectural Systems Developer
Aurasphere - Acoustics
Building Biology - Human Compatible Architecture
"--- Every time...do it better ---"

poco2013
Mentor

Not sure what you mean by "multiple expression"? But any Element can have or use as many expressions as you want as long as their availability is properly classified for that element. And one expression can read another expressions value, but the order of processing is important. A expression can not write to another expression, only read its value as any other property. However an expression can only address the properties of the individual element to which it is assigned. IOW: it can not aggregate properties from multiple elements even if they have the same availability classification.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Cheers

But since the transactional width is so narrow, Im not sure why you would have multiple expressions?

Do you have any examples of multiple expressions being used ie a descendant list?

Mark Wesse
AC26 | Win10 | Since v6.5r
Architerion - Architectural Systems Developer
Aurasphere - Acoustics
Building Biology - Human Compatible Architecture
"--- Every time...do it better ---"

poco2013
Mentor

Again I believe we are talking about two different application. You can have multiple expression calculating different things, just as you can have multiple user properties.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Correct but the singular property can only produce a single output in the target format.

For context, do you have any properties that are multiline expressions...I really dont get it...sorry

Mark Wesse
AC26 | Win10 | Since v6.5r
Architerion - Architectural Systems Developer
Aurasphere - Acoustics
Building Biology - Human Compatible Architecture
"--- Every time...do it better ---"

Hi Mark.

Before the "general parameters" were made available (introduced  in AC25, if im not mistaken), the pix below is the "old school way of 

analyzing values (thru multiple expressions). This way , results can be collected in a single column

in listings/schedules, especially for summing up the volumes of diff. elements  (e.g.,column volume+beam volume+object volume+ n volume).. Hence, Bill of quantities is the most obvious application of expression-based properties.

ToperBarrientos_0-1707909357797.png

Pls, find the guide here : Archicad 27 Help (graphisoft.com)

Cheers !

Apple M1 Pro CPU
RAM 32 GB
1 TB OS: Ventura 13.1
Learn and get certified!