Error: can't find modeldef.xml

#2
Hi Bob:

If it had not yet been addressed in one of your recent threads regarding the SDK, to output in newer P3Dv4.x-specific MDL formats from ex: MCX, one would need to install the P3Dv4.4 SDK:

https://www.prepar3d.com/support/sdk/



Note that you had previously been recommended to use the P3Dv1.4x SDK in lieu of having the MS FSX Deluxe / Acceleration DVDs for a SDK to use with FSX / FSX:SE (...also 'ESP' which LM developed under an "education only" license into P3D 1.4.x).

Arno's MCX will find and fill in your paths for SDK components it requires after the SDK runs its auto-installer, but as with prior versions of the P3D SDK, if you also manually run Config.exe, if may 'do more voodoo' for those that do use 3DSMAX.


BTW: Perhaps some others here may have some insight on whether one may benefit from adding more than the default SDK info to one's 'working copy' of the ModelDef.XML file, as I have seen this mentioned in threads here and at SOH forum when certain SimObjects and custom aircraft are being developed / modified ? ;)

Hope this helps a bit more. :)

GaryGB
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#3
Hi,

I see you put the modeldef.xml in the P3D path option itself, you only need to specify it in the modeldefpath option. You have it pointing to the 1.4 SDK, do you still have that one installed?

Which MDL format are you trying to export to when you get the error?
 
#4
Good thoughts Gary, I see what you mean. I hadn't let you know that my mission changed when Dick explained the P3d options. So I have P3dv4 now (I miss the Cessnas), and downloaded the P4 SDK, and use 3dsmax18. All this before I downloaded the developer version of mcx, just to confirm my tool path. Then I plan to prove Library Creator dev version in the same way. That looks like the easiest way to manage libraries. So far I haven't succeeded in converting a test object to bgl. I exported a cube properly mapped, using the p3dsdk export tool and acheived a .x file. Import of the .x file appears successful. The exports are where the problems appear. Mdl export just can't find modeldef. The bgl compiler throws off errors. Attached is the .x file and bmp plus dds. Can you export it for p4.4 in mcx?
 

Attachments

#5
Arno, thanks for writing, I was answering Gary and just saw your post. I just cleaned up the options....I still cant link mcx to modeldef.xml Note the error on the mdl export showing below the options window.
 

Attachments

#7
https://www.fsdeveloper.com/forum/threads/error-cant-find-modeldef-xml.444455/post-813814

Good thoughts Gary, I see what you mean.

I hadn't let you know that my mission changed when Dick explained the P3d options. So I have P3dv4 now (I miss the Cessnas), and downloaded the P4 SDK, and use 3dsmax18.

All this before I downloaded the developer version of mcx, just to confirm my tool path.\

Then I plan to prove Library Creator dev version in the same way. That looks like the easiest way to manage libraries.

So far I haven't succeeded in converting a test object to bgl. I exported a cube properly mapped, using the p3dsdk export tool and achieved a .x file. Import of the .x file appears successful. The exports are where the problems appear. Mdl export just can't find modeldef. The bgl compiler throws off errors.

Attached is the .x file and bmp plus dds. Can you export it for p4.4 in mcx?
Hi Bob:

I do not yet have P3D installed to test with, as I am waiting for LM to resolve numerous out standing 'issues'. :pushpin:


However, I just installed P3Dv4.4 SDK on a Windows 7 Pro 64-Bit computer (...after installing a 'required' Dot Net 4.7.2 update).

When I attempted to run:

C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.4.16.27106\ConfigSDK.exe

...I got this error message:

"Are you sure you want to update the SDK tool configuration files to refer to the
current Lockheed Martin Prepar3D installation path? (Yes/No): yes

Unable to find the Lockheed Martin Prepar3D installation path.
Lockheed Martin Prepar3D must be installed and have been ran at least once.

Press any key to exit..."


Not to be deterred < spelling ? :laughing: >, I used MCX (Dev.Rel. from Dec. 6th. 2018) to compile your source files above.

I see that MCX had already found several paths for P3Dv4 SDK, but had retained the ModelDef.XML path from P3Dv1.4x


Nonetheless, your source files were compiled by MCX without complaint into a P3Dv4.4 *.MDL and also exported as "scenery" packaged into a ready-to-use BGLComp XML-type library BGL.



FYI: Although many do find it convenient to utilize Arno's Library Creator XML, because I use Sketchup for 3D modeling of a multi-object "scene", l almost always am using a Geo-located 3D model exported as a Google Earth *.KMZ file.

When I 'hide' all the other objects in a Sketchup 'scene' except the individual object to be exported, that exported object's *.KMZ file is imported by MCX while precisely retaining my Geo-located placement info, thus placement info is included within the "hybrid" scenery BGL exported by MCX.

This means that the BGL has a 'hybrid' function of containing both the MDL and any available placement information for the MDL ...all within the same BGL.

ADE is able to do this also, by including 3D MDLs and placement info inside what would otherwise be an 'airport' type BGL.

I still may further 'fine tune' my scenery object positioning at run time in FSX using Instant Scenery.

Yup, I can actually edit the object placement info inside a 'hybrid' Library / Placement BGL by opening it in Instant Scenery. :idea:


But certainly many would prefer discrete Library BGLs containing only 3D MDLs and 'Placement' BGL:s containing only the placement information for those MDLs, as it can sometimes be easier for both FS developers and end users to troubleshoot if all 'Library' BGLs have a _LIB suffix and 'Placement' BGLs have a _PLC suffix ...in their file names.


PS: Perhaps Arno may wish to test whether the current MCX Dev.Rel. is not finding a path for P3Dv4.4 ModelDef.XML at: :scratchch

C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.4.16.27106\Modeling\3ds Max\bin\modeldef.xml


NOTE: P3Dv4.4 SDK installer, on a Windows 7 Pro 64-Bit computer, stores the path to P3Dv4.4 ModelDef.XML at:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\79139094D55B3AE5AB4252C1E301A94B

Data Value: C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.4.16.27106\Modeling\3ds Max\bin\modeldef.xml



Hope this helps ! :)

GaryGB
 
Last edited:
#8
Thanks Gary, helps a great deal. One new understanding here is that my .x file was not corrupted. While I didn't think it would be, when things don't seem to work as you expect, anything becomes possible. I'll install p3dsdk1.4, and see if I can duplicate your success.
 
#10
Aha, Between Tom and Gary, problem solved. User error, as is commonly the case. I did have the older p3dsdk installed, as my first thought was to develop for fsx, but then I changed my mind to use p3d to see my creations. At that point, I removed the earlier p3dsdk, just to clean up the HD. Somehow, it must have autopopulated in mcx. I re-installed the earlier p3d sdk, and replicated Gary's success. Then I re-directed MCX to the newest modeldef, and now it works also.

Thanks all, I appreciated your help! Arno, problem solved!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#11
PS: Perhaps Arno may wish to test whether the current MCX Dev.Rel. is not finding a path for P3Dv4.4 ModelDef.XML at: :scratchch

C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.4.16.27106\Modeling\3ds Max\bin\modeldef.xml
I have checked the code, MCX will indeed take that location for the modeldef.xml file, when it can locate the P3D v4 SDK. But if the FSX or older P3D SDK is found it will take the modeldef.xml from there. Maybe I should reverse that order in the future.
 
Top