From 06a9bd229ce2da380d1d50a00802e7c1b2157b8b Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 27 Mar 2023 16:03:04 +0200 Subject: [PATCH] Draft: Better DWG export message - issue #8887 (#8893) * Draft: Better DWG export message - issue #8887 --- src/Mod/Draft/importDWG.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index 1b71d85c35..9f3e560346 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -222,7 +222,9 @@ def convertToDxf(dwgfilename): FCC.PrintMessage(translate("draft", "Conversion successful") + "\n") return result else: - FCC.PrintError(translate("draft","Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version.") + "\n") + FCC.PrintError(translate("draft","""Error during DWG conversion. +Try moving the DWG file to a directory path without spaces and non-english characters, +or try saving to a lower DWG version.""") + "\n") else: if conv != 0: FCC.PrintError(translate("draft", "ODA File Converter not found") + "\n") @@ -302,6 +304,9 @@ def convertToDwg(dxffilename, dwgfilename): proc.communicate() return dwgfilename except Exception: - FCC.PrintError(translate("draft", "QCAD error") + "\n") - + if conv != 0: + FCC.PrintError(translate("draft", "QCAD error") + "\n") + else: + FCC.PrintError(translate("draft", """No suitable DWG convertor has been found. +Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG""") + "\n") return None