Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Error when loading .x object

Author
Message
andycb
18
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 29th Aug 2010 13:37
I've made a model in Google Sketchup 7 (Free version) and exported it using the "3D Rad" plugin.

When I try to load this model in DBPro i get the error message:
Runtime Error 105 - File does not exist at line 1

I've tried running DBPro in compatibility mode (Windows XP Service Pack 2 was recommended by my system) and in Administrator mode. In both modes I get the exact same error message.

I've also tried loading a different .x file, this time made in Caligari Truespace 7.6, this gets the same error message.

I've attached the code I used which is just to load and position the object and I've attached both of the models I tried loading (the fan model was made in sketchup).



By the way I'm running Windows 7 Home Premium 64Bit on a Dell Studio 1555 laptop.
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 29th Aug 2010 14:50
Well, there's nothing wrong with your model (exept that it is kinda big in size, lots of vertices), and it does take a while for it to load.



Here's the code I used:


Are you sure you saved the project completely (Save project as.../ Save All), and the files are where they should?

Cheers

Slayer rules!!! Yeaaah, man!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 29th Aug 2010 15:12
You need to ensure that you point the progfram to the exact location the object is located. If you don't have a DBPro file created then you need to specify the full path to the object. If you do have a DBPro file, then by default the program will look in the same location as the exe file.

My signature is NOT a moderator plaything! Stop changing it!
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 29th Aug 2010 17:32
Quote: "Runtime Error 105 - File does not exist at line 1
"


That should have been a big clue that your program could not find the file, not that the file was corrupt or unloadable.

As mentioned above, either copy the file to your project directory, or use the proper path for the LOAD OBJECT filename.

Nice fan!

andycb
18
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 29th Aug 2010 17:50 Edited at: 29th Aug 2010 18:34
Thanks TheSlayer, It seems to be working now. I think the problem was that I hadn't saved the project, I had only saved the code file.
andycb
18
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 29th Aug 2010 18:33
Ok I've now run it a couple of times and it still seems to be a bit buggy, for some reason I've had to put the .X file into my temp folder in order for the application to keep on picking it up.
andycb
18
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 29th Aug 2010 18:39
Thanks Rich Dersheimer when I made it it did have textures on it but they don't seem to have been exported with the model.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Aug 2010 18:44 Edited at: 29th Aug 2010 18:48
That sounds like you haven't saved a new project, and it is making the exe in the temp folder to me. Just copy your code, make a fresh project, paste the code into the newly made empty file and then save both source and project. Then add the .x file in using the add media button via the editor (You don't have to do this but it can make keeping track of media you use easier). It will make a folder called media within your new project. Make sure you change your directory to media by using cd "media", and load your object up from there.
If you want to speed up your loading time save it as a dbo object after loading the .x, and use that instead. It should speed it up a little.
Regarding the texture it depends how you textured it in your package. If it is a UVW map just load that image in db and texture the object. Once you save it as dbo it will retain its texture without needing to texture it every time.

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2026-07-23 17:02:21
Your offset time is: 2026-07-23 17:02:21