Imported attributes are valid only for current instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-11-30
03:55 PM
- last edited on
‎2022-10-04
04:49 PM
by
Daniel Kassai
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?
- Labels:
-
Add-On (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-11-30 04:47 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-03 12:20 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-04 02:13 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-04 05:42 PM
Regards, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-05 08:31 AM
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-05 11:30 AM
Thanks, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-12-05 03:26 PM