How to retrieve wire bodies from Part?

Hi,

I want to get the wire bodies added in the PART documents. I have used API Part::GetBodies2 with swBodyType_e :: swWireBody but it cant return any bodies.

SolidworksApi/macros