From f9113ce9401fb31804a0d4f2117a0ba6f5490bd5 Mon Sep 17 00:00:00 2001 From: robbr48 Date: Mon, 27 May 2024 10:52:36 +0200 Subject: [PATCH] Fix FMI exports for models without HMF extension --- HopsanGUI/GUIObjects/GUIContainerObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HopsanGUI/GUIObjects/GUIContainerObject.cpp b/HopsanGUI/GUIObjects/GUIContainerObject.cpp index eca92e017..5cef18ebf 100644 --- a/HopsanGUI/GUIObjects/GUIContainerObject.cpp +++ b/HopsanGUI/GUIObjects/GUIContainerObject.cpp @@ -3388,7 +3388,7 @@ void SystemObject::exportToFMU(QString savePath, int version, ArchitectureEnumT } //Save model to hmf in export directory - mpModelWidget->saveTo(savePath+"/"+mModelFileInfo.fileName().replace(" ", "_")); + mpModelWidget->saveTo(savePath+"/"+mModelFileInfo.completeBaseName().replace(" ", "_")+".hmf"); auto spGenerator = createDefaultExportGenerator(); spGenerator->setCompilerPath(gpConfig->getCompilerPath(arch));