Choose your top Archicad wishes!

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

Indexnumber of fill created in gdl

cuba
Advocate

Hello,

I am trying to make a gdl object that uses some custom fills

Is it possible to find the attribute index number of a fill created in gdl?

 
made the fill "Terrain50" with command:
define translucent_fill Terrain50 filltypes_mask 1+2+4,1,1,1,1,1,1,1,1,50
 
Or are there standard archicad index numbers which are always the same
for fills like solid fill/empty fill/ 25%fill/ 50%fill/ 75%fill ?
 
Is it possible to assign a fill to the newly foldersystem?
 
Thanks
 
Apple M1 Max 32 GB Ventura
AC27
4 REPLIES 4
Barry Kelly
Moderator

If you define a fill in GDL, it will create an index number that is not being used in the current file.

This may be different in different files as it just uses the first available index number.

 

If you are concerned with index numbers, then you are better off creating the attribute in your template.

You can save this attribute as a XML file and you can import it into any other file using the 'override by index number' option.

You will still have problems if someone creates a different attribute with your number in another file first.

 

There is a bit of an art to managing attributes if you want to be fussy about them.

Basically, I create an attribute (for all attribute types) in my template with a much higher number than the existing attributes.

Now when a user creates a new attribute, it will be created with an index number higher than the highest I have just created.

But when I create a new attribute to use in my template, I manipulate the number so it is lower than the highest number I created, but not one of the lowest available numbers either.

Now I can export that as an XML file and import it into any other file (based on my template) and know that the index numbers will be as I want them, and not get messed up by any attributes the users create.

 

Should any GDL objects create attributes, they will be the lowest available index numbers - so I leave those free and never use them.

 

So in effect I create a buffer where I can create attributes with the index numbers I want, and can control them.

I leave maybe 50 to 100 low attribute numbers available for GDL objects (more if you want), and create a high index attribute (could be 1000 or 10000 if you want) so all user made attributes are higher than that.

That gives me a range of attribute numbers available below 1000 (or 10000) that I can use with no problem of them clashing with anything else.

 

Until we have a centrally managed attribute system for all files, this is the best method I have found to control them.

 

Barry.

 

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
cuba
Advocate

Hello Barry,

 

Thank you for your thorough explanation.

I have now created an object that creates a new set of fills by itself. With ind(fill, ) I can read these indexes.

I want to make the object so that it can be used on different templates preferably without importing/exporting xml files (> dummyproof for students)

 

Some questions about this:

1/ Is it possible to assign own index numbers to set of fills? or bulk customization of index numbers?

2/ Is it possible to assign a new attribute to a folder?

3/ Is it also possible to delete fills with gdl?

 

 

Thanks,

Apple M1 Max 32 GB Ventura
AC27

1/ Is it possible to assign own index numbers to set of fills? or bulk customization of index numbers?

Not if you are defining attributes in GDL.

As far as I know you have no control over the attribute numbers in GDL - they are automatically assigned based on the file the object is loaded into.

Can be different attribute numbers in different files if those files have already different attributes.

You can only control attribute numbers in the Attribute Manager.

 

2/ Is it possible to assign a new attribute to a folder?

Not as far as I know.

 

3/ Is it also possible to delete fills with gdl?

No, only with the Attribute Manager.

But if you have defined fills in a loaded object, they will simply re-generate again.

The only way to remove them is to remove the object that generates them from the loaded library.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
cuba
Advocate

Thank you for your answers, Barry!

Apple M1 Max 32 GB Ventura
AC27