cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
archiEI
Newcomer

Object auto-increment - GDL

I want a GDL object that auto-increments its counter parameter each time a new instance is placed. What is the correct approach in current ArchiCAD GDL? LIBRARYGLOBAL is read-only (MVOptions), and OPEN requires an extension filter name I don't know.

2 Replies 2
runxel
Moderator

That's not really possible, I think. Best chance might be to use the element ID (GLOB_ID) for that plus the "increment ID after each placement" option in the work environment.

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»
Barry Kelly
Moderator

The only way I can think this would possibly work automatically is to read and write to an external text file.

But this text file would have to be in the embedded folder of the library manager (I have never tried that)

Having the text file in your user profile on the local hard drive (the usual default location for data files) is fine, but that will only work if you are using the file on that one machine.

 

The element ID as runxel suggest is a good idea but you will have to manually watch this control the IDs via the element ID manager or through a schedule.

 

But if you are looking to increment items within one object, like parking bay numbers, then this can be done (and has been already).

Individual object do not talk to each other, so they have no way to know what incremental ID they should be.

 

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!