Page 1 of 1

Posted: Tue Jan 22, 2013 12:49 am
by lionheart
Hey all,

I have just moved up to Max 2012, and for the past several days, have been trying to get the XtoMDL program to compile a simple test file (basic shell of a plane with Xanim file).

Nothing I did worked. Not one thing. Very odd, as I remember doing a couple back in the FSX SDK days a few years ago on my iMac computer running Windows XP 32bit.

I just ran Sean Isom's 64bit XtoMDL and it worked awesome, worked the first time.

I think the XtoMDL 'stock' program for the P3D SDK might not work on x86 OS computers. I am just reporting this in is all. I hear the 64bit XtoMDL is much better (higher output limits) then the stock program compiler, but wanted to report that the stock unit isnt working, at least on my rig.

i7 3770 chips, 3.4 GHz, 16 Gigs of RAM, nVidia 660 with 2 Gigs of VRam, Win7 Ultimate x86 OS.

The link for Seans program is here;

Posted: Tue Jan 22, 2013 12:10 pm
by lionheart
Well, I spoke too soon. Not all of the model will export. If I export all parts, the fuselage disappears. Exporting the fuselage only, and it shows up. :S

Posted: Wed Jan 23, 2013 12:16 pm
by lionheart
Well, I found out something. One must have the 'window' of the 3DSM7 (thru 2012) Plugins folder 'open' or active and 'then' you run the XtoMdl program. :S Took me several days to find this out. I was trying to run it from the Desktop.

Master Modeler MJahn blessed me with a cool trick for running the compiler 'without' the DOS window. Create a BAT file in the Plugins folder. Drop the X and Xanim files in the Plugins folder, click the BAT file and you get an instant model (if you have done things correctly).

To create the BAT file trigger, open Windows Notepad. Copy/paste the following into the Notepad;

BEGIN COPY //////////////////////////////////////////////////////////////////////////////////////////

rem Move this file to C:\P3D_SDK\Modeling_SDK\3DSM7\Plugins

rem Move YourPlaneName.x and YourPlaneName.xanim to same location.

rem Execute this file.

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml YourPlaneName.x > YourPlaneName.log

END COPY ////////////////////////////////////////////////////////////////////////////////////////////

Save as something like 'CreateMDL'. Exit. Rename the file CreateMDL.BAT (instead of CreateMDL.TXT). You are changing the file type.

Double click on that and the program XtoMdl should run for a moment, then pause. Click a key to exit, and you should have a MDL file and a build log.



rem Move YourPlanesName.x and YourPlanesName.xanim to same location. << CHANGE THIS TO 'YOUR' MODEL FILE NAME

rem Execute this file.

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml YourPlanesName.x > YourPlanesName.log << ALSO CHANGE THIS TO YOUR PLANES NAME ON THE X AND LOG

Be sure that when you click on the BAT file, you of course are in the Plugins folder.

Thanks to MJahn for this. Much nicer then going through typing all that by memory into the quite antiquated DOS window. :S

On a side note. If you try to do the 'shortcut' and SendTo' trick by Bill Leaming for running the XtoMdl program, note that you cannot exceed 128 characters on the input target string. Like on my rig, my entry input string was MASSIVE and had spaces on all the folder names, so I could not get mine to work concerning the shortcut creation. So if you cannot get the Shortcut to work, try this.


Posted: Wed Jan 23, 2013 2:50 pm
by N4GIX
Once again, I emphasize that one should use a custom path for both the sim and the SDK to avoid the "rediculously long paths" that are "default"...

Or, one can create a "virtual drive letter" via a .bat file for those really long paths using the subst command:

SUBST R: "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\"

Alternatively, one may run the .bat file automatically every time the computer is booted.

In either case though, the net result is much shorter command line text! My suggested "Target" for a shortcut then would be:

%windir%\system32\cmd.exe /K R:"\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe" /XANIM /DICT:R:"\Environment Kit\Modeling SDK\bin\modeldef.XML" > buildlog.txt

Obviously, one could even go one step further and define two subst drive letters that drill all the way down to the last sub-folder name, which could reduce the "Target" command the absolute shortest possible!

%windir%\system32\cmd.exe /K R:"\xtomdl.exe" /XANIM /DICT:S:"\modeldef.XML" > buildlog.txt

Posted: Wed Jan 23, 2013 11:14 pm
by lionheart
Thanks Bill! Another very cool trick and tool of efficiency to get around that old DOS window. :)