Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Passing information between multiple versions of an object

derekjackson
Expert
Hi,
we've developed a 'car parking bay' object that allows us to place down a block of parking spaces in a style that we like, and caters for disabled / bike spaces too.

Each instance outputs the amount of spaces in that particular block, which is helpful for scheduling. However, that still leaves us to add up the totals of the various blocks to get the overall number of spaces.

We'd like for each instance of the object to additionally display the total number of parking spaces in the whole project, which would mean passing integers between the various objects (or else a master object collecting the various numbers and adding them together for the others to read).

Is this even possible with GDL? I've had a look at user-defined global variables, but that doesn't seem to help as the information only seems to travel from the master object to the child objects - not the other way around...

Does anyone know of any example code of how to achieve something like this?

Thanks!
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
4 REPLIES 4
DGSketcher
Legend
You can read object parameters into a schedule. Could your object be written to update Parameters so that a schedule would pick up & total the various types of spaces?

Lazy solution would be to give each parking block a start number and auto number each space. You can then just add a drawing note confirming the final number.
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
derekjackson
Expert
Thanks for the thoughts.

Each individual block is currently outputting its total to the schedule correctly, so potentially we could set up a schedule to total up the blocks.

However, we can't rely on people knowing how to do this, so we were hoping to be able to do that calculation within the object (or within another) before it goes to the schedule.

The lazy solution sounds great, but again, there's potential for human error...
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
alemanda
Advocate
You can write/read the total number in/from a text file.
AC27 latest hotfix

Win 10 Pro 64bit

Double XEON 14 CORES (tot 28 physical cores)

32GB RAM - SSD 256GB - Nvidia Quadro K620

Display DELL 25'' 2560x1440

www.almadw.it
Laszlo Nagy
Community Admin
Community Admin
alemanda wrote:
You can write/read the total number in/from a text file.
I have done this many years ago where I had to sum up the areas of multiple Zones that belong to the same apartment. Zones belonging to the same apartment were given the same Element ID. Then each Zone would use the GDL Data Extension to write its area value into a file with the same name as their common Element ID (for example, "A-13", and A-13.txt). Then these Zones could also read back the sum of areas from the same file.
It was pretty complex but it worked fine.
I wonder if you could also use the GDL XML Extension to do the same.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28