I'm also interested in being able to execute home-grown "Model Search" queries, because the output is so convenient for the user, who can click on a result row, and immediately find the element in the project tree.
When I call Repository.GetElementsByQuery("Recently Modified Elements","2008/01/01") it works - ie. with a built-in SQL query.
If I make my own copy of the same SQL query and call it "RecentlyModifiedQElementsAlso", I can demonstrate that it works using the user interface. But when I call Repository.GetElementsByQuery("RecentlyModifiedQElementsAlso", "2008/01/01"), it triggers an error: "EA_MenuClick: Search Not Found".
There is a facility to create a Model Search from within an addin, using Repository.AddDefinedSearches and passing a string containing an XML version of a model search (such as one exported from the Model Search Management dialog). This method successfully adds a search, which can be run manually like any other, but it still cannot be found using Repository.GetElementsByQuery.
So, my questions are "Is GetElementsByQuery intended to be able to find and execute Model Search queries that are not built-in queries?" If so, how does one do it? If not, can this feature be added?