I dont think that RunModelSearch (both in repository and project interface) can be used to populate a report with elements from a SQL query. The documentation says “Runs a search, displaying the results in Enterprise Architect’s Model Search window”, meaning that the elements are just shown in the search window but since the function does not have any return value, the elements cannot be accessed (Maybe there is a function accessing the search window, that I’m not aware of).
My workaround is, that I programmatically create a temporary diagram with the result of an SQL query, sort of a programmatical “ad-hoc” diagram. This diagram is then used as input to eaDocX (elements are formated in a table, so the layout does not matter).
Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.
Download