Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Add-In Search
Enterprise Architect enables Extensions to integrate with the Model Search. Searches can be defined that execute a method within your Add-In and display your results in an integrated way.
The method that runs the search must be structured like this:
Function <method name> (ByVal Rep As Repository, ByVal SearchText As String, ByRef XMLResults As String) As Variant
- Rep - EA.Repository - IN - The current open repository
- SearchText - String - IN - An optional field that you can fill in through the Model Search
- XMLResults - String - OUT - At completion of the method, this should contain the results for the search; the results should be an XML string that conforms to the Search Data Format
Return Value
The method must return any non-empty value for the results to be displayed.
Advanced Usage
In addition to the displayed results, two additional hidden fields can be passed into the XML that provide special functionality.
- CLASSTYPE - Returning a field of CLASSTYPE, containing the Object_Type value from the t_object table, displays the appropriate icon in the column in which you place the field
- CLASSGUID - Returning a field of CLASSGUID, containing an ea_guid value, enables the Model Search to track the object in the Project Browser and open the Properties window for the element by double-clicking in the Model Search
Learn more