Query Libraries
Query libraries provide a way to save and re-use queries. The queries can be saved internally in the project file or externally. Each project has its own library, available with ProjectModel.QueryCategories.
Libraries are divided into categories, where each category is a container for saved queries. The saved queries are represented by QueryAttribute objects.
To add a query to the library, first add a category then add the query.
Dim queryLib As Query.QueryLibrary = activeProject.QueryCategories
Dim queryCat As Query.QueryCategory
queryCat = queryLib.AddCategory("catName")
queryCat.AddQuery("queryName", "query description", queryObj)
To save a query to an external file, call QueryModel.Save().