Hopsan / hopsan

Hopsan is a free multi-domain system simulation tool developed at the division of Fluid and mechatronic systems at Linköping university.
Apache License 2.0
146 stars 41 forks source link

FMI export assumes model file has .hmf extension #2200

Closed robbr48 closed 1 month ago

robbr48 commented 4 months ago

Describe the bug When exporting to FMI, the model is saved to the temp folder using its current filename. Then the generator loads the file to generate the source file with the model string - but then it assumes the file has the ".hmf" extension. If the original file does not, the generator cannot find the model file and export will fail.

To Reproduce

  1. Open a Hopsan model without .hmf extension
  2. Try to export to FMI
  3. Export will fail
robbr48 commented 1 month ago

Resolved by #2224.