Automated MDL 2 XML Converter


Overview

The attached function only needs 2 inputs to convert an MDL file into XML :

  • HyperWorks version, namely MotionView
  • MDL file path

The conversion is performed in batch and the XML file is created under the same path of the original MDL file, with the same name except for the file extension. Now it is possible to plug this function into any workflow that the user might have, for example: imagine that one MDL file could be given and a set of Compose-based commands would:

  1. Convert the MDL into XML
  2. Run the XML with MotionSolve
  3. Post-process the results using Compose CAE readers
  4. Output a summary with necessary metrics

 

The script essentially automates the process of creating the following string:

"C:/Program Files/Altair/2020/hwdesktop/io/translators/bin/win64/mdl_batch.bat" C:\Users\roberta\Documents\example.mdl C:\Users\roberta\Documents\example.xml MotionSolve

Explanation of each argument:

  • Location of MotionView batch file
  • Input MDL file
  • Output XML file
  • Solver to be used

 

Regards,

 

Roberta