FEM: Make sure it's clear what failed when ccx is not set and cannot be found

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2015-10-18 20:43:44 +01:00
committed by wmayer
parent d8488027d7
commit d5cf69b646
2 changed files with 13 additions and 3 deletions

View File

@@ -52,7 +52,10 @@ class FemWorkbench (Workbench):
ccx_path = p1.stdout.read().split('\n')[0]
elif system() == 'Windows':
ccx_path = FreeCAD.getHomePath() + 'bin/ccx.exe'
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem").SetString("ccxBinaryPath", ccx_path)
if ccx_path:
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem").SetString("ccxBinaryPath", ccx_path)
else:
FreeCAD.Console.PrintError("CalculiX ccx binary not found! Please set it manually in FEM preferences.\n")
except Exception as e:
FreeCAD.Console.PrintError(e.message)