Hi all,

I'm trying to use FCollada to extract some Geometry Entity from a big collada file, but it was crash! Could you please take a look at my code:

Code :
cout << "Finding and saving meshs ... " << endl;
 
FCollada::Initialize();
FCDocument*	document = FCollada::NewTopDocument();	
wstring fullpath = StringToWString(DAE_Filename);
FCollada::LoadDocumentFromFile(document, fullpath.c_str());
 
// find a specific mesh, then save it
string save_id = "Box01-mesh";
FCDocument*	save_document = FCollada::NewTopDocument();
FCDGeometry* third = document->GetGeometryLibrary()->FindDaeId(save_id.c_str());
save_document->GetGeometryLibrary()->AddEntity(third);
 
save_id = "c:\\geoid1039.dea";
fullpath = StringToWString(save_id);
if (!FCollada::SaveDocument(save_document, fullpath.c_str())) cout << " fail to save " <<  save_id << endl;
 
SAFE_DELETE(document);
SAFE_DELETE(save_document);
FCollada::Release();