Book a Demo

Author Topic: Search for particular stereotype on Add In  (Read 4368 times)

Kezia

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Search for particular stereotype on Add In
« on: February 25, 2009, 05:52:58 pm »
Hi all,

Is there any build in searching function in EA that enable us to search for particular stereotype from Add In?
I hope can find this kind of feature, cos searching throughout the model recursively is so time consuming, it takes so long to finish searching.
FYI, I'm using C#.

Cheers.

Manfred Kröpfli

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Search for particular stereotype on Add In
« Reply #1 on: March 17, 2009, 12:19:06 am »
Hi

I'm looking for smarter ways to query the full EA model, too.

tree structures are anlways a matter of change, but EA Addins shall continue to work independently. Are there ways to query the model by element type or stereotype? For as Addin, this is much more important than query the model by element name or note, which more aplies to the needs of the EA GUI user.

P.S.: Are there other options than "Simple" for EA.Package.GetElementsByQuery()?

Thanks for any helpful advice
Manfred
Cheers
Manfred

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Search for particular stereotype on Add In
« Reply #2 on: March 17, 2009, 08:17:50 am »
Manfred is on the right track.  GetElementsByQuery takes the name of a search.  You can define a search for almost anything in EA, including Element Type or Stereotype.

Manfred Kröpfli

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Search for particular stereotype on Add In
« Reply #3 on: March 17, 2009, 06:26:39 pm »
Hi Simon

thanks for the encouraging news. But how do you define an element query other than "Simple" (e.g. via Type and|or Stereotype) using the EA C# API? I didn't find any hints in the documentation so far.

Thanks in advance
Manfred
Cheers
Manfred

Manfred Kröpfli

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Search for particular stereotype on Add In
« Reply #4 on: March 18, 2009, 01:46:12 am »
Look for "Create Search Definitions" in the EA User Guide. This might do the job  ;)
Cheers
Manfred