Programmatically create a new view

Programmatically create a new view

Hi Guys,
Is is possible to create a view programmatically and dynamically using deluge? i.e. using a conditional if statement.

Rgds and Thanks
Andrew