2024-11-22 12:09 AM - last edited on 2024-11-24 11:48 PM by Laszlo Nagy
I need some rules for how to add custom attributes to our templates such that they hold over time (across version upgrades) and don't screw up default lib object appearances. I suspect there is a range of index numbers that are safe to use (i.e. they avoid index space of default attributes). I recently added some surfaces to my template, and I must have overwritten default surface index values, and I'm suffering. I guess, always append, and never add by index or name. I wish I had a clear roadmap for how the default system is organized.
Solved! Go to Solution.
2024-11-22 01:55 AM
You are correct that you do not want to alter the default Graphisoft attributes.
In my template for each attribute type I create a new one, but amend the attribute index number so it is much higher than the highest default attribute.
Say for example surfaces.
The highest index for a default surface is 350.
I create a new surface and manipulate the index number so it is 1000, it could even be higher.
Now when a new surface is created by any user in a file using that template, it will automatically get an index number of 1001.
If I want to add a new surface to the template, I do the same thing, but I manipulate that index number so it is less than 1000.
I would leave a little space after 350, so i would make the new attribute 500.
That gives a little wiggle room for you existing jobs where people may have already created new surface attribute 351, 352 etc.
When importing attribute from my template to other job files, I always use 'overwrite by index number', as Archicad uses the index numbers and not names.
This way I know exactly what I have in my template and I know I will not be overwriting any of the default attributes.
Or if they are overwritten, they will be the same.
This does not help when importing attributes from one user file to another, because in one file someone will create a blue surface with an attribute of 1001 and in another someone will create a red surface that is 1001.
That is when you would 'append' rather than 'overwrite', but you have to be selective of the attributes you import.
That is why you look after the template and if those red and blue surfaces are important for future use, you import them to the template and manipulate the index numbers to be less than 1000.
Users should ideally then only import attributes from the template into their user files.
Barry.
2024-11-22 01:55 AM
You are correct that you do not want to alter the default Graphisoft attributes.
In my template for each attribute type I create a new one, but amend the attribute index number so it is much higher than the highest default attribute.
Say for example surfaces.
The highest index for a default surface is 350.
I create a new surface and manipulate the index number so it is 1000, it could even be higher.
Now when a new surface is created by any user in a file using that template, it will automatically get an index number of 1001.
If I want to add a new surface to the template, I do the same thing, but I manipulate that index number so it is less than 1000.
I would leave a little space after 350, so i would make the new attribute 500.
That gives a little wiggle room for you existing jobs where people may have already created new surface attribute 351, 352 etc.
When importing attribute from my template to other job files, I always use 'overwrite by index number', as Archicad uses the index numbers and not names.
This way I know exactly what I have in my template and I know I will not be overwriting any of the default attributes.
Or if they are overwritten, they will be the same.
This does not help when importing attributes from one user file to another, because in one file someone will create a blue surface with an attribute of 1001 and in another someone will create a red surface that is 1001.
That is when you would 'append' rather than 'overwrite', but you have to be selective of the attributes you import.
That is why you look after the template and if those red and blue surfaces are important for future use, you import them to the template and manipulate the index numbers to be less than 1000.
Users should ideally then only import attributes from the template into their user files.
Barry.
2024-11-22 02:05 AM
Very helpful, Barry. Thanks for such a comprehensive response.