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 ^^
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement