I want to know how to enable view programmatically in drupal 7? I need it to be exportable with features. I need a snippet code for that. Thanks!
Based on your question I honestly think you are doing something wrong, but if you really do have a legit use case I think you can just do this:
$view = views_get_view('machine-name-of-view'); views_export_status($view, TRUE); views_save_view($view);