Author Topic: Get name of a built-in search from its GUID  (Read 5909 times)

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Get name of a built-in search from its GUID
« on: July 31, 2013, 01:24:01 am »
In the definition of a ModelView, the name of  search is defined by its GUID.
But to run the search using repository.getElementsByQuery, we need the name of the search.
Does anyone know how to do a lookup on the search GUID to get its name ?
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Get name of a built-in search from its GUID
« Reply #1 on: July 31, 2013, 04:56:29 am »
Hi Ian,

as far as I know the searches are not in the repository.

They are defined locally for your computer in *.xml files (e.g. MDG).

You will find them in:
- MDG folder
- %appdata%

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Get name of a built-in search from its GUID
« Reply #2 on: July 31, 2013, 06:45:05 am »
Helmut is right: %appdata%\Sparx Systems\EA\Search Data\EA_Search.xml

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get name of a built-in search from its GUID
« Reply #3 on: July 31, 2013, 03:34:24 pm »
The searches are indeed in that EA_Search.xml file, but I believe they are not always there.
If you have a clean installation, without any custom searches I'm not sure if the the file is even present, much less if it contains the details for all built-in searches.

But there is a good chance that the GUID's of the built-in searches are fixed and don't change over time/versions/models.

So you could get the the GUID's once, and keep them "hardcoded" in your code.

Geert

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Get name of a built-in search from its GUID
« Reply #4 on: July 31, 2013, 05:48:31 pm »
Thanks gentlemen.
FYI - the EA-supplied, built-in searches are NOT in the /AppData/.../EA_Search.XML - these are only the user-defined ones.

As usual :-) Geert has the best suggestion: I'll just have to pick the built-in searches one at a time, and make a note of the GUIDs, then hard-code it into eaDocX.
@Sparx: this doesn't seem a very polite solution: any chance of a bit of help? Perhaps you might save me the trouble, and post the Name/GUID pairs ?
Pretty please :-)
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Get name of a built-in search from its GUID
« Reply #5 on: July 31, 2013, 06:01:24 pm »
So here's the data, done the hard way:

  • Resources      srchID={02707522-DB58-4db2-82A9-E987764859EB};
  • Method Details      srchID={FEDECDF1-720B-4fae-B36B-08AC1C35E18D};
  • Recently Modified Diagrams      srchID={EBF4F7B8-6188-4f32-B22A-3C7403EA6A95};
  • Recently Modified Elements      srchID={208FA579-C35F-436b-A557-83046DAF8F4E};
  • Failed Internal Tests      srchID={4D1F04A1-1762-4e3e-90AE-5CA86CBAC90E};
  • Find Orphans      srchID={0CA24A24-EFDA-436f-8E47-4D385118E214};
  • Attribute Details      srchID={A5481563-8672-454d-B038-927430FA86B1};
  • Simple      srchID={DEEA1BE3-4565-428b-B746-83403E071FE6}
  • Extended      srchID={FC9FB0D7-76F9-4db2-8635-5AE8172CF732};
  • Find Bookmarked Elements      srchID={4ECCA3E7-1674-43dc-900E-8A61D51C0441};
  • My Checked Out Packages      srchID={D3825173-0DAC-4bbb-874F-FCF1D445B1AF};
  • Simple Issues Search      srchID={DEEA1BE3-4565-428b-B746-83403E071FE6}
  • Requirements      srchID={67003A6F-D6F4-46d7-828E-66D55A3CF2AA};
  • Responsibility      srchID={A9EAC1EE-536B-45db-96C2-B49B4C1A0EAF};
  • Element Name      srchID={F5B9369D-F986-42ed-829C-EB4FA1072CD5};
« Last Edit: July 31, 2013, 06:01:55 pm by ianemitchell »
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get name of a built-in search from its GUID
« Reply #6 on: July 31, 2013, 06:01:45 pm »
Ian,

I think if you export all searches (including the built-in's) you get an xml file with all the details, including GUID's.

Geert