FEM: solver settings, add methods to retrieve the comments writing preference parameter

This commit is contained in:
Bernd Hahnebach
2019-03-31 15:07:56 +02:00
committed by wmayer
parent 8f760d1c37
commit 9358daed7c

View File

@@ -58,6 +58,7 @@ class _SolverDlg(object):
self.param_path = param_path
self.use_default = use_default
self.custom_path = custom_path
self.write_comments = "writeCommentsToInputFile"
# get the parameter object where the paramete are saved in
self.param_group = FreeCAD.ParamGet(self.param_path)
@@ -79,6 +80,9 @@ class _SolverDlg(object):
from distutils.spawn import find_executable as find_bin
return find_bin(binary)
def get_write_comments(self):
return self.param_group.GetBool(self.write_comments, True)
'''
default:
@@ -129,6 +133,16 @@ def getBinary(name):
return None
def get_write_comments(name):
if name in _SOLVER_PARAM:
return _SOLVER_PARAM[name].get_write_comments()
else:
FreeCAD.Console.PrintError(
'Settings solver name: {} not found in solver settings modules _SOLVER_PARAM dirctionary.\n'.format(name)
)
return None
# ******** working directory parameter ***********************************************************
def getCustomDir():
param_group = FreeCAD.ParamGet(_GENERAL_PARAM)