It seems that the snippet for STEP files works with casting to StepGeom_GeometricRepresentationItem, and may be, not tested, with StepRepr_RepresentationItem, rather than StepRepr_Representation.
Extract Entity Names from STEP/IGES files / Discussion
This is the discussion related to the wiki page Extract Entity Names from STEP/IGES files.
page revision: 0, last edited: 21 Jan 2011 11:24