Ok, does anyone know how/if you can clone a SharePoint view and then add it to a list. The SPViewCollection.Add overloads will not take an instance of SPView and I couldn't find any documentation that indicated how to do so.
For example I would like to essentially do this:
var myList = SPContext.Current.Web.List;//or something similar
var baseView = myList.DefaultView;
var myNewView = baseView.Clone("my view", base.RowLimit, base.Paged, false);
myNewView.Query = "<Where>......</Where>";
myList.Views.Add(myNewView);//this overload doesn't exist!
The end result is I want the new View to copy the behavior of the original view with the exception of an altered query. I'm willing to go a different route, but I'm not sure what that is. (I noticed the BaseViewID property that may help, but it's read-only).
Any suggestion or hints would be appreciated.