Problem with GetFaces() in C++

Hi Guys,

I'm trying to get faces for Hole feature:

std::vector& holeFaces = hole1->GetFaces();
size_t nHoleFaces = holeFaces.size(), j;
for (j=0; j {
NXOpen::Face* faceObject = holeFaces[j];
if (faceObject == NULL)
continue;
NXOpen::Face::FaceType type = faceObject->SolidFaceType();
}

But I get huge number for nHoleFaces.
And SolidFaceType() call crashes.

The same happens when I try to get bodies:
std::vector& holeBodies = holeSeries->GetBodies();

Primitives as Diameter or Depth I can get without problem, but any objects hierarchy is not.

Do you have an idea?

Thanks it advance.