Hi,

To loop through all entities, look for ent_next in the manual.