def METHOD_NAME(objectslist, fileString):
    "called when freecad exports a file"
    if len(objectslist) != 1:
        Console.PrintError(
            "This exporter can only "
            "export one object.\n")
        return
    obj = objectslist[0]
    if not obj.isDerivedFrom("Fem::FemMeshObject"):
        Console.PrintError("No FEM mesh object selected.\n")
        return
    write(fileString, obj.FemMesh)