kind of like that (not tested):
Code:
int i = 0;
LPD3DXMESH pmesh = (LPD3DXMESH)ent_getmesh(NULL, i, 0);
while(pmesh)
{

// add the triangles of the mesh to newton here

i++;
pmesh = (LPD3DXMESH)ent_getmesh(NULL, i, 0);
}