iamjaideep80 Posted March 29, 2008 Share Posted March 29, 2008 Hi.... I am writing an external application that reads a geo/bgeo file. But I am getting problem in loading a geometry file. My code is like : GU_Detail* sopGdp = new GU_Detail; const UT_Options *options = new UT_Options; sopGdp->load((const char*)fullFileName ,options); In H9 the geometry loading procedure is somewhat changed. Now the syntax is load(const char *, const UT_Options *options); It now takes UT_Options* . Somebody told me that insted of UT_Options NULL also works. I tried that also. But no help. My Code compiles properly. But when I run it, "load" method returns -1. That is operation unsuccessful. My "fullFileName" is correct, and it is the full path to my geo/bgeo file on disk. If UT_Options has to be set properly , what is the procedure for that? Plz Help.... Quote Link to comment Share on other sites More sharing options...
crunch Posted March 29, 2008 Share Posted March 29, 2008 load(const char *, const UT_Options *options);It now takes UT_Options* . Somebody told me that insted of UT_Options NULL also works. I tried that also. But no help. This works for me: #include <stdio.h> #include <GU/GU_Detail.h> int main(int argc, char *argv[]) { GU_Detail gdp; if (gdp.load(argv[1], 0) >= 0) { fprintf(stderr, "Ok: %d points\n", gdp.points().entries()); } else fprintf(stderr, "Fail\n"); return 0; } Try: % testapp defgeo.bgeo Ok: 80 points Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.