BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

Imported attributes are valid only for current instance

Anonymous
Not applicable
Hi, guys!

I have a working addon which reads a text file and adds new elements in AC: walls, roofs, etc. with some properties. When I import a wall, for example, a piece of the wall is immediately drawn and I can move and modify it. I can see its properties with right button -> Wall Selection Settings. But if I first choose from the top bar my new wall and then I draw it, the properties have no values, only names.
Is there a way to apply the properties so that they will be shown in the second case?
7 REPLIES 7
Anonymous
Not applicable
I'm not sure if it understood well but in the second case, I assume that you draw a new wall in AC and then activated addon.

In this case, if the addon is written just to read a text file and create new elements then probably no. You need to add functionality to attach properties to selected elements based on a sort of identification of existing element in files.

You see properties because they are classified for Wall. But you see their default value in this case probably empty value.
Try Propertie_test in examples there should be an example for this kind of functionality.
Anonymous
Not applicable
I open the file, read the attributes and properties in vectors, and then add them using these functions:

GSErrCode ACAPI_Attribute_Create()
GSErrCode ACAPI_Property_CreatePropertyDefinition()
GSErrCode = ACAPI_Element_SetProperties()

I am still not very confident of what every piece of code does (it is written by my previous colleague) and now I have to find a way to fix it only if it is possible.
Anonymous
Not applicable
I assume that whole thing was written just for importing purposes.

Element_SetProperties should work fine but It's probably taking newly created wall element from previous bits of code. Probably you need to make new command which takes existing wall elements and then does Element_SetProperties using theirs GUIDs.

This is only my assumption with your info provided. If you can be more specific or provide more code it will be easier to suggest something more helpfull.
Akos Somorjai
Graphisoft
Graphisoft
Are you also creating the properties yourself, or are they part of the normal ARCHICAD template file?

Regards, Akos
Anonymous
Not applicable
I create a new property group and add properties in it - names and values and I can see them in the wall that is imported and drawn. This property group is applied globally in ArchiCAD because I can see it in every new wall that I draw manually - built-in type or my imported type. But the values of the newly drawn walls are always blank.
I hoped that I should have the values in the case when I draw another piece of the wall that I imported. But if it is not possible, I think this issue can become a "known limitation".
Akos Somorjai
Graphisoft
Graphisoft
Could you please send me an XML export of the properties after you added them to a project? You can save that file from the Property Manager dialog.

Thanks, Akos
Anonymous
Not applicable
In the Property Manager the values are also empty. The last Property Group is imported - "Shmendri_Kapeli".
Learn and get certified!