Saturday - last edited Sunday by runxel
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.
Sunday
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.
Sunday
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.
Sunday
@Barry Kelly schrieb: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.
Not necessarily so. If you just use a number as element ID, which is easily controled in the info toolbar, and have enabled the aforementioned setting from the work environment, then after each placing the ID will increment automatically.
You can then use that to – presumably – show the number on the plan, without the need of grabbing the element ID manager or other means.
You can even save that ID into a new parameter and lock it, so that after the first placing the number would be fixed and you can change the element ID, if you want to.
Monday
Thank you very much Runxel and Barry Kelly, I will try that.
yesterday
The auto element ID increment will work for every object placed, not just a particular object such as cabinets or carbays for example.
That is why I said it will work but you will need to manually adjust the element IDs if you only want it only for a particular object type.
Barry.
yesterday
Yeah that is true, it's a global setting. So if its undesirable anywhere else?... more work there. Somewhere a compromise has to be taken.
7 hours ago
I did my object and it’ s verry cool, Thank you. It’s a verry simple object, just a number whitch incrément himself grace to the ID. I use it for the numerotation of trees on a landscape plan for a permission file.
3 hours ago
Two alternatives for future project that need numerotation:
- Heimo Mooslechner object
-Tapir script that will change ID : https://community.graphisoft.com/t5/Graphisoft-Insights/Tip-of-the-Month-Auto-number-elements-using-...