0
我想在C++中打開sketchup模型。我下載了sdk,編譯了這個例子,但是,當我嘗試運行它時,它不會讀取任何臉部,型號名稱,也不會讀取任何內容。有人能幫助我嗎?sketchup C++ api閱讀skp文件
SUInitialize();
// Load the model from a file
SUModelRef model = SU_INVALID;
SUResult res = SUModelCreateFromFile(&model, "model.skp");
if (res != SU_ERROR_NONE)
{
std::cout << "error" << std::endl;
return 1;
}
// Get the entity container of the model.
SUEntitiesRef entities = SU_INVALID;
SUModelGetEntities(model, &entities);
size_t faceCount = 0;
SUEntitiesGetNumFaces(entities, &faceCount);
// faceCount = 0..., why???!!!