Skip to content

Commit

Permalink
Draft: Better DWG export message - issue #8887 (#8893)
Browse files Browse the repository at this point in the history
* Draft: Better DWG export message - issue #8887
  • Loading branch information
yorikvanhavre committed Mar 27, 2023
1 parent 4b982a3 commit 3e1528a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Mod/Draft/importDWG.py
Expand Up @@ -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")

Check warning on line 230 in src/Mod/Draft/importDWG.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Bad indentation. Found 20 spaces, expected 16 (bad-indentation)
Expand Down Expand Up @@ -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

0 comments on commit 3e1528a

Please sign in to comment.