Incorrect context bpy.ops.uv.project_from_view

Hi,

Does anyone know how to call the “bpy.ops.uv.project_from_view” function from the text editor or the console?

Everytime I try I get the following error :
“RuntimeError: Operator bpy.ops.uv.project_from_view.poll() failed, context is incorrect”