Selecting entities in the active block

Selecting entities in the active block
 1impact.gui.output_toolbox.add("Waiting for user to select...")
 2entity_array = impact.gui.picker.get_selection("Please select the entities of interest", ipSelectTool.stBox)
 3if entity_array:
 4    impact.gui.output_toolbox.add("Selected entities: " + str(len(entity_array)) - 1+1)
 5    for ent in entity_array:
 6
 7        # For simplicity, we just display the type of object that we have
 8        impact.gui.output_toolbox.add(type(ent))
 9
10