The step.DesignCursor class is an iterator for looping over some or all of the STEP data instances managed by a Design object. When you create a cursor, you can specify the string name of the EXPRESS type of objects that you want to iterate over. The cursor will then give you only those kinds of object, or instances of an EXPRESS subtype.
This is the Python equivalent of the
in the C++ libraries.
D = step.find_design(part123.stp) # iterate over all entities for obj in step.DesignCursor(D): print (entity #%d% obj.entity_id()) # iterate over just the representation items for obj in step.DesignCursor(D,representation_item): print (rep item #%d, name %s% (obj.entity_id(), obj.name))