Loading skp model
-
hello everyone,
did anyone ever tested the example code from the sketchup official website, The example that demonstrates how to load a SketchUp model from a .SKP file and read some data from it.
i was testing it but the model wasn't loaded.
SUModelRef model = SU_INVALID;
SUResult res = SUModelCreateFromFile(&model, "test.skp");
// It's best to always check the return code from each SU function call.
// Only showing this check once to keep this example short.
if (res != SU_ERROR_NONE)
std::cout << "error " << res <<"ok";
// return 1;and when i tried to display the "res" variable it showed the number 7.
what did i did wrong ?
-
You probably want to make sure you have a full path instead of a relative path. With relative it's going to look for the file in the current working directory.
-
yes that how i solved it full path and the number 7 that was displayed reffers to :
SU_ERROR_SERIALIZATION if an error occurs during reading of the file
thnx ^^
Advertisement