Author Topic: Add-In Search, Search doesn't show up in EA Search, category Addin  (Read 1980 times)

Helmut Ortmann

  • EA User
  • **
  • Posts: 916
  • Karma: +39/-1
    • View Profile
Hello,

I am trying to develop an Add-In Search with C# according to http://sparxsystems.com/enterprise_architect_user_guide/13.5/automation/add-in_search.html.

The Add-In works correctly but EA doesn't recognize the Add-In Search. I would expect to see the Search in 'Find in Project' category Addin. Nothing shows up.

I tried the following signatures and checked it in the DLL with ildasm.exe. The methods are public methods in the Add-In Class.

Signatures:
- public string AddInSearchSample2(EA.Repository repository, string searchText, out string xmlResults)
- public string AddInSearchSample2(EA.Repository repository, string searchText, ref string xmlResults)
- public object AddInSearchSample2(EA.Repository repository, string searchText, out string xmlResults)
- public object AddInSearchSample2(EA.Repository repository, string searchText, ref string xmlResults)


Has someone experiences, examples or ideas?

Thanks,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 9442
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #1 on: July 23, 2017, 09:30:14 pm »
It appears that few daredevils have tried this in the past: http://sparxsystems.com/forums/smf/index.php/topic,3893.msg118222.html#msg118222 Sparx's response here is also more like "good luck, my friend" :-(

However, another thread http://sparxsystems.com/forums/smf/index.php/topic,5710.msg126289.html#msg126289 points to  an SO answer https://stackoverflow.com/questions/28203087/enterprise-architect-model-search-xml-format/28285544#28285544 where someone seems to have successfully used and add-in search.

q.
« Last Edit: July 23, 2017, 09:35:31 pm by qwerty »

Helmut Ortmann

  • EA User
  • **
  • Posts: 916
  • Karma: +39/-1
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #2 on: July 23, 2017, 11:42:35 pm »
Hi q,

thanks a lot for your engagement.

I've tried it with two Add_Ins, EA 13.5 and 12, with and without DEBUG mode. I can't see the Add-In Searches in the Search Window. In the dll I can see the public function:
- public object AddInSearchSample(EA.Repository repository, string searchText, out string xmlResults)

The signature is according to the links which make sense.

The functionality behind the Add-In Search works fine. I only can't run it manually because it doesn't show up.

Kind regards,

Helmut



Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 9442
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #3 on: July 24, 2017, 12:43:27 am »
How did you define the search in Ctrl-F?

q.

Helmut Ortmann

  • EA User
  • **
  • Posts: 916
  • Karma: +39/-1
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #4 on: July 24, 2017, 03:24:01 am »
Hi,

I thought I could see the Search in the AddIn category after CTRL+F.

Have I missed something? Is there something to do to see the Search after CTRL+F?

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Helmut Ortmann

  • EA User
  • **
  • Posts: 916
  • Karma: +39/-1
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #5 on: July 24, 2017, 03:26:15 am »
Thanks, I got it. I have to configure the Search. Now I see it.

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Helmut Ortmann

  • EA User
  • **
  • Posts: 916
  • Karma: +39/-1
    • View Profile
Re: Add-In Search, Search doesn't show up in EA Search, category Addin
« Reply #6 on: July 24, 2017, 03:45:22 am »
Hi q,

problem solved. As you suggested I simply forgot to define the Search with New Search.

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)