parameters: (filename)
return_statement: return doc
docstring: called when freecad wants to open a file
docstring_summary: called when freecad wants to open a file
docstring_tokens: called when freecad wants to open a file
function: def open(filename):
      "called when freecad wants to open a file"
      docname = os.path.splitext(os.path.basename(filename))[0]
      doc = FreeCAD.newDocument(docname)
      doc.Label = docname
      FreeCAD.ActiveDocument = doc
      read(filename)
      return doc
function_tokens: def open ( filename ) : docname = os . path . splitext ( os . path . basename ( filename ) ) [ 0 ] doc = FreeCAD . newDocument ( docname ) doc . Label = docname FreeCAD . ActiveDocument = doc read ( filename ) return doc