We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-09-23 04:26 PM - last edited on 2024-09-23 09:18 PM by Laszlo Nagy
Good day everyone. I have the following code snippet:
API_SelectionInfo selectionInfo;
GS::Array<API_Neig> neigs;
rapidjson::Document document(rapidjson::kArrayType);
document.SetArray();
rapidjson::Value value;
value.SetObject();
auto err = ACAPI_Selection_Get(&selectionInfo, &neigs, false);
BMKillHandle((GSHandle*)&selectionInfo.marquee.coords);
bool selection_empty = err == APIERR_NOSEL;
if (err == APIERR_NOSEL)
err = NoError;
if (err != NoError)
return CALLBACK_REMOTE_NACK;
API_Element element;
for (const API_Neig& neig : neigs) {
element.header.guid = neig.guid;
if (ACAPI_Element_Get(&element) != NoError)
continue;
GS::Array<API_PropertyDefinition> definitions;
if (ACAPI_Element_GetPropertyDefinitions(neig.guid, API_PropertyDefinitionFilter_All, definitions) != NoError)
return CALLBACK_REMOTE_NACK;
GS::Array<API_Property> properties;
if (ACAPI_Element_GetPropertyValues(neig.guid, definitions, properties) != NoError)
return CALLBACK_REMOTE_NACK;
... (the rest is ok)
}
When I run this code for AC25 - it is all ok. When I do the same for AC SE 2022, it fails at ACAPI_Element_GetPropertyValues(). I am not sure why. I was debugging carefully that part of the code. It was pointing to the correct guid. Hence, it should return the correct property definition which would be used for getting property values, however, that does not happen in AC SE 2022.
Have somebody had something like this anomaly behavior?
Operating system used: Windows 11