Hello all,
I have a problem with getting User Defined properties. This problem is associated with only one project so far, but I do not exclude that this is due to the fact that the elements in this project have a large number of properties. I get property in the standard way described in the documentation.
This is my code:
GS::Array<API_PropertyDefinition> definitions2;
if (ACAPI_Element_GetPropertyDefinitions(elementapi->header.guid, API_PropertyDefinitionFilter_UserDefined, definitions2) == NoError)
{
GS::Array<API_Property> properties;
//next line very slow
if (ACAPI_Element_GetPropertyValues(elementapi->header.guid, definitions, properties) == NoError)
{
UInt32 count = properties.GetSize();
for (UInt32 j = 0; j < properties.GetSize(); j++)
{
.....
....
}
}
}
In total, the project has approximately 195 thousand elements (medium-sized project)
this is line works fast and getting an array of about 90 API_PropertyDefinition:
ACAPI_Element_GetPropertyDefinitions(elementapi->header.guid, API_PropertyDefinitionFilter_UserDefined, definitions2)
but the next line is executed relatively slowly (about a second for each Archicad element or each array API_PropertyDefinition (there are 195 thousand of them in the project), perhaps somewhere more somewhere less:
ACAPI_Element_GetPropertyValues(elementapi->header.guid, definitions, properties)
And the whole project takes me about two days.
Most likely there is a way when I can get these properties faster, or somehow optimize the process of obtaining them. Please advise how it could be accelerated?
With Best Regards,
Andrey