2023-08-15 10:54 AM
Hello,
I am importing a .gsm file and create a library part for it. I tried to insert additional data in the parameters section, however some gsm files are password protected and I cannot access that section.
Is it possible to attach classification to the library part and add properties there? What is the best approach to add these additional properties to the library part?
Thanks in advance.
2023-08-23 03:40 PM
Yes, of course,
go to options --> property manager, if needed you should make a group or else make a parameter in one of the existing groups.
In the value definition you can specify the type of data, and default value
underneath, the availability for classifications is the most important.
This says which elements should have this parameter shown.
The quick and dirty way is too just say all, but that makes Archicad quite heavy as it has to load parameters for every single element in your project.
The better way to select on custom and click edit.
--> A popup will be opened asking which classification and which sub category the parameter have to have…
--> in your project, you select the objects which you want to add more information.
--> you need to go to the classification and properties and turn on the specific classification and select the subcategory.
--> once that is done, you will automatically have the parameters underneath classifications (where the properties are shown) added.
--> and you can add the information you want.
Hopefully, this answers your question.
2023-08-24 10:04 AM - edited 2023-08-24 10:06 AM
Thanks a lot @Bawar Tanay for the comprehensive answer but I want to do that programmatically, in the plugin.
As far as I understand from the documentation, classifications apply to attributes and elements only, not to library parts. There are ACAPI_Element_ and ACAPI_Attribute_ sets of functions but nothing about library parts, is that correct?
Regarding the storage of the custom data, we can save it in a project data section (see ModulData Manager).
2023-08-24 10:44 AM
Not that I know much about API stuff but ...
Objects are elements, so ACAPI_Element should work there.
However, individual types of objects may be another matter.
They do have sub-types, maybe you can inquire those?
Barry.
2023-08-24 12:32 PM
Yes, if we create an instance of the library part (i.e. element - door, window, chair, etc.) then we can attach classifications and properties to it.
This is what I want to do - create a library part and if the gsm file is not protected w/ a password, add the custom data in some section (add it in the parameters section or create new section). Then, when I open the Settings dialog I can see my data in Custom Settings. However, I can not do this if there is a password. So I am trying to find a workaround. I want to add classifications and properties to the library part but so far w/o any success. And here I need some help - at least I want to know if that is possible. However when I create an object (element) of that part I can easily add properties to it.
2023-08-24 02:40 PM
I wouldn't have thought a password protected object would stop you applying classifications and properties as they have nothing to do with the GDL scripts.
Classification is added based on the default setting of the tool as you place the element, and properties are added based on the classification set.
I have no idea if you can control that with an API before you place the object.
Barry.