Ralph wrote:that’s an option, but I don’t want to change the active floor every time. My goal is to make this check for every floor and then delete the layouts of floors without elements in it.
You could call
ACAPI_Element_GetElemList with the API_ElemFilterFlags parameter set to APIFilt_OnActFloor . That will extract a list of elements on the active floor - it empty, you know there aren't any.