Skip to content

Commit

Permalink
+ support .inp file format
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 1, 2015
1 parent 5b27b31 commit bc9b8bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Mod/Fem/Gui/AppFemGuiPy.cpp
Expand Up @@ -76,7 +76,7 @@ static PyObject * getActiveAnalysis(PyObject *self, PyObject *args)
}

/* module functions */
static PyObject * openEditor(PyObject *self, PyObject *args)
static PyObject * open(PyObject *self, PyObject *args)
{
char* Name;
const char* DocName;
Expand Down Expand Up @@ -124,7 +124,9 @@ struct PyMethodDef FemGui_Import_methods[] = {
"setActiveAnalysis(AnalysisObject) -- Set the Analysis object in work."},
{"getActiveAnalysis" ,getActiveAnalysis ,METH_VARARGS,
"getActiveAnalysis() -- Returns the Analysis object in work."},
{"openEditor" ,openEditor ,METH_VARARGS,
"openEditor() -- Opens a simple text editor for an FEM file."},
{"open" ,open ,METH_VARARGS,
"open(string) -- Opens an Abaqus file in a text editor."},
{"insert" ,open ,METH_VARARGS,
"insert(string,string) -- Opens an Abaqus file in a text editor."},
{NULL, NULL} /* end of table marker */
};
1 change: 1 addition & 0 deletions src/Mod/Fem/Init.py
Expand Up @@ -30,3 +30,4 @@
FreeCAD.addImportType("FEM formats (*.unv *.med *.dat *.bdf)","Fem")
FreeCAD.addExportType("FEM formats (*.unv *.med *.dat *.inp)","Fem")
FreeCAD.addImportType("CalculiX result (*.frd)","CalculixLib")
FreeCAD.addImportType("Abaqus file (*.inp)","FemGui")
2 changes: 1 addition & 1 deletion src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -560,7 +560,7 @@ def editCalculixInputFile(self):
# The Abaqus syntax highlighter works similarly to that one of SciTE so that our
# own editor can be used now
import FemGui
FemGui.openEditor(filename)
FemGui.open(filename)

def runCalculix(self):
print 'runCalculix'
Expand Down

0 comments on commit bc9b8bc

Please sign in to comment.