FEM: solver frame work, get rid of Active Document code
This commit is contained in:
@@ -118,7 +118,7 @@ class Results(run.Results):
|
||||
if femutils.is_of_type(m.Mesh, "Fem::FemMeshResult"):
|
||||
self.analysis.Document.removeObject(m.Mesh.Name)
|
||||
self.analysis.Document.removeObject(m.Name)
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
self.analysis.Document.recompute()
|
||||
|
||||
def load_results_ccxfrd(self):
|
||||
frd_result_file = os.path.join(
|
||||
|
||||
@@ -1381,7 +1381,7 @@ class FemInputWriterCcx(writerbase.FemInputWriter):
|
||||
time.ctime()
|
||||
))
|
||||
f.write("** file name --> {}\n".format(
|
||||
os.path.basename(FreeCAD.ActiveDocument.FileName)
|
||||
os.path.basename(self.document.FileName)
|
||||
))
|
||||
f.write("** analysis name --> {}\n".format(
|
||||
self.analysis.Name
|
||||
|
||||
@@ -58,7 +58,7 @@ class ViewProxy(equationbase.BaseViewProxy):
|
||||
def doubleClicked(self, vobj):
|
||||
if Gui.Control.activeDialog():
|
||||
Gui.Control.closeDialog()
|
||||
Gui.ActiveDocument.setEdit(vobj.Object.Name)
|
||||
vobj.Document.setEdit(vobj.Object.Name)
|
||||
return True
|
||||
|
||||
def getTaskWidget(self, vobj):
|
||||
|
||||
@@ -115,7 +115,7 @@ class ViewProxy(object):
|
||||
def doubleClicked(self, vobj):
|
||||
if Gui.Control.activeDialog():
|
||||
Gui.Control.closeDialog()
|
||||
Gui.ActiveDocument.setEdit(vobj.Object.Name)
|
||||
vobj.Document.setEdit(vobj.Object.Name)
|
||||
return True
|
||||
|
||||
def attach(self, vobj):
|
||||
|
||||
@@ -81,7 +81,7 @@ class FemInputWriter():
|
||||
"Error: FemInputWriter has no working_dir --> "
|
||||
"we are going to make a temporary one!\n"
|
||||
)
|
||||
self.dir_name = FreeCAD.ActiveDocument.TransientDir.replace(
|
||||
self.dir_name = self.document.TransientDir.replace(
|
||||
"\\", "/"
|
||||
) + "/FemAnl_" + analysis_obj.Uid[-4:]
|
||||
if not os.path.isdir(self.dir_name):
|
||||
|
||||
@@ -119,7 +119,7 @@ class Results(run.Results):
|
||||
if femutils.is_of_type(m.Mesh, "Fem::FemMeshResult"):
|
||||
self.analysis.Document.removeObject(m.Mesh.Name)
|
||||
self.analysis.Document.removeObject(m.Name)
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
self.analysis.Document.recompute()
|
||||
|
||||
def load_results_z88o2(self):
|
||||
disp_result_file = os.path.join(
|
||||
|
||||
Reference in New Issue
Block a user