Draft: Better DWG export message - issue #8887 (#8893)

* Draft: Better DWG export message - issue #8887
This commit is contained in:
Yorik van Havre
2023-03-27 16:03:04 +02:00
committed by GitHub
parent 4b982a3dbd
commit 3e1528a714

View File

@@ -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