Exception from RayIntersections when the user has a face selected.

I'm getting and exception when calling RayIntersections only when the user has a  face selected. It doesn't seem to matter if I call Clearsection2(true) before RayIntersections. With nothing selected everything works as it should without errors.

thanks for any info

jim

using Part

Lang c#

SW 2010

Error: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

SolidworksApi macros