Difference between revisions of "XtoMDL"

From FSDeveloper Wiki
Jump to: navigation, search
m
(XtoMDL)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Infobox-Applicable-FSVersion
 +
| FSXI = false
 +
| FSXA = true
 +
| FSX = true
 +
| FS2004 = false
 +
| FS2002 = false
 +
| FS2000 = unknown
 +
| FS98 = unknown
 +
}}
 
== XtoMDL ==
 
== XtoMDL ==
  
 
Original Entry by Bill Leaming
 
Original Entry by Bill Leaming
  
The new XtoMDL.exe program for FSX is "command line driven," meaning that there's no fancy-schmanzy GUI to use.
+
The new XtoMDL.exe program for FSX and Prepar3D is "command line driven," meaning that there's no fancy-schmanzy GUI to use.
  
 
Did you know that you could create a shortcut on your desktop that would 'proxy' commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the 'target' (fix up c:\temp to be the appropriate paths to the files):
 
Did you know that you could create a shortcut on your desktop that would 'proxy' commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the 'target' (fix up c:\temp to be the appropriate paths to the files):
Line 9: Line 18:
 
  %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML
 
  %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML
  
For example, my "target" path is:
+
For example, my "Target:" path is -
  
  %windir%\system32\cmd.exe /K C:\Autodesk\Max8\FSX_Tools\xtomdl.exe /DICT:C:\Autodesk\Max8\FSX_Tools\modeldef.XML
+
  %windir%\system32\cmd.exe /K E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe" /XANIM /DICT:E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML" > buildlog.txt
  
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results.
+
My "Start in:" path is -
 +
 
 +
"E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins"
 +
 
 +
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command "> buildlog.txt" will write a text file with the results of the command, which is useful to review if there are any error messages.
  
 
=== Aircraft models ===
 
=== Aircraft models ===
  
As an "improvement" to the above(2), rename the shortcut something like "CompileAircraft" then move the shortcut to your \SendTo folder:
+
As an "improvement" to the above(2), move or drag the shortcut to your ..\SendTo folder:
  
 +
'''WinXP'''
 
  C:\Documents and Settings\User Name\SendTo
 
  C:\Documents and Settings\User Name\SendTo
  
Next, right click on the moved shortcut and edit the "target" like this:
+
'''Vista - and - Win7'''
 
+
C:\Users\''YourUserName''\AppData\Roaming\Microsoft\Windows\SendTo
  %windir%\system32\cmd.exe /K C:\Autodesk\Max8\3DSM7\Plugins\xtomdl.exe /XANIM /DICT:C:\Autodesk\Max8\3DSM7\Plugins\modeldef.XML > buildlog.txt
 
 
 
Note that I've added the /XANIM switch, as well as the "> buildlog.txt"  so that I can get a full text file of the X2MDL.exe's build log in case of problems. ;)
 
  
Now, in Explorer rightclick on the .x file and select "CompileAircraft" from the popup menu.
+
Now, in Explorer right-click '''on the .x file''' and select "CompileAircraft" from the popup menu.
  
 
NOTE: The chief advantage of the "Send To" method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.
 
NOTE: The chief advantage of the "Send To" method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.
Line 37: Line 48:
 
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:
 
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:
  
  %windir%\system32\cmd.exe /K C:\Autodesk\Max8\FSX_Tools\xtomdl.exe /DICT:C:\Autodesk\Max8\FSX_Tools\modeldef.XML /XMLSAMPLE
+
  %windir%\system32\cmd.exe /K E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe" /DICT:E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML" /XMLSAMPLE > buildlog.txt
  
 
=== Common Problems ===
 
=== Common Problems ===
Line 52: Line 63:
 
*2) Thanks to Tom Gibson for this tip!
 
*2) Thanks to Tom Gibson for this tip!
  
[[category:FSX]]
+
[[category:Aircraft Design]]
[[category:Aircraft design]]
+
[[category:Scenery Design]]
[[category:Scenery design]]
 
 
[[Category:Tools]]
 
[[Category:Tools]]

Latest revision as of 10:12, 4 April 2014

XtoMDL

Original Entry by Bill Leaming

The new XtoMDL.exe program for FSX and Prepar3D is "command line driven," meaning that there's no fancy-schmanzy GUI to use.

Did you know that you could create a shortcut on your desktop that would 'proxy' commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the 'target' (fix up c:\temp to be the appropriate paths to the files):

%windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML

For example, my "Target:" path is -

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

My "Start in:" path is -

"E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins"

You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command "> buildlog.txt" will write a text file with the results of the command, which is useful to review if there are any error messages.

Aircraft models

As an "improvement" to the above(2), move or drag the shortcut to your ..\SendTo folder:

WinXP

C:\Documents and Settings\User Name\SendTo

Vista - and - Win7

C:\Users\YourUserName\AppData\Roaming\Microsoft\Windows\SendTo

Now, in Explorer right-click on the .x file and select "CompileAircraft" from the popup menu.

NOTE: The chief advantage of the "Send To" method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.

Scenery models

Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.

Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:

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

Common Problems

1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)

2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed

3. XTOMDL.EXE doesn't start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft

References

  • 1) Thanks to John Kane from ACES (MS Developer) for this tip!
  • 2) Thanks to Tom Gibson for this tip!