We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2 weeks ago
Hi,
I have a problem retreiving element data (ACAPI_Element_Get and ACAPI_Element_GetMemo).
With the following steps you can set up a problematic case.
First create a simple wall.
Then create a unique design option with name something like “window1“.
Switch to this new design option, not just “viewing“ it but in “edit mode“.
Create a window into the simple wall. It has to be visible only in the design option “window1“ and not in the main model.
Switch to main model, the window will disappear. That is OK.
Now, in this plan, with inactivated design options, you will still receive the element data for the invisible window. It will be in the MEMO of the wall, it will be in the array of guids if you ask ACAPI_Element_GetElemList() for windows.
My question is: how can you check with an API function if an element is active or hidden in the actual design option? This info seems not available for an Addon developer, which is a really big problem. If the user has many design options and he/she uses them extensively, element data will be totally messed up.
Or is there a solution to check element existense check with design options?
TIA,
Geza
2 weeks ago
Hi Geza,
Yeah I'm also not too happy with the available functionality regarding design options. I've just recently worked on it the first time so I might not have a full understanding of the possibilities yet.
Anyway what seems to work for me is to use the built-in properties "Design Option Set Name" and "Design Option Set". With that you can get the design option an element is associated with.
Then remains the question how to check the current design option settings. I didn't use it yet, but I think you can get the settings for specific views with GetDesignOptionCombinationSettingsOf(). Not sure if/how this would work with e.g. the story viewpoints or if it needs to really be a view in the view map.
HTH,
Bernd