Book a Demo

Author Topic: Help with Add-in search  (Read 6879 times)

Sorno

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Help with Add-in search
« on: May 16, 2014, 01:44:42 am »
Hi,

I'm trying to do a add-in search, but which don't work. During debug I see that the add-in is called and that it returns what  I want, but there is no results showing up in EA.

This is what I return to EA (any takes on whats wrong?):
Code: [Select]
<ReportViewData UID="MySearchID" >
<Fields>
 <Field name="CLASSGUID"/>
<Field name="CLASSTYPE"/>
</Fields>
<Rows>
<Row>
<Field name="CLASSGUID" value="{774D1047-A519-44ce-BE34-019376954557}"/>
<Field name="CLASSTYPE" value="Class"/>
</Row>
</Rows>
</ReportViewData>

Thank you for the help!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Help with Add-in search
« Reply #1 on: May 16, 2014, 03:28:42 pm »
I'm not sure, because i've never used add-in searches myself, but I would try to add another column besides the guid and the type.
Those two columns are used to define the icon and to be able to "select in project browser".
It's the other columns (like name, stereotype, whatever,...) that are used to actually show things in the search results table.

Geert

Sorno

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: Help with Add-in search
« Reply #2 on: June 03, 2014, 11:19:41 pm »
Thanks for the input, but I have tried to no avail.

I tried to change the input to EA to following:
Code: [Select]
<ReportViewData>
<Fields>
   <Field name="Name"/>
</Fields>
<Rows>
 <Row>
  <Field name="Name" value="Test namn"/>
 </Row>
</Rows>
</ReportViewData>


I can see that this is what is returned from the Add-in, but not result.  As far as I can see is this coherent with http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/xml_format_search_data.html

Though, I'm not sure what they mean by "// The order of the columns of information to be appended here must match the order that the search run in Enterprise Architect would normally display.

 // Furthermore, if you append results onto a custom SQL Search, then the order used in your Custom SQL must match the order used below."
 

Jonas

MrSnrub

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Help with Add-in search
« Reply #3 on: January 31, 2015, 02:17:49 am »
Did you ever resolve this? I am stuck in the exact same place.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Help with Add-in search
« Reply #4 on: January 31, 2015, 05:42:34 am »
Oh, I see that Geert tells he's not used it :-? I thought I read it in his navigator blog. I'll try it later the evening...

q.

MrSnrub

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Help with Add-in search
« Reply #5 on: February 04, 2015, 05:17:42 am »
My issue was not using the "out" keyword in C# in the declaration of the search function for the XMLResults string:
Code: [Select]
public object MyAddinSearch(EA.Repository Repository, String SearchText, out String XMLResults).

More details: http://stackoverflow.com/questions/28203087/enterprise-architect-model-search-xml-format/28285544#28285544