Book a Demo

Author Topic: search and replace  (Read 3875 times)

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
search and replace
« on: March 12, 2021, 09:07:35 pm »
Hi
I am looking for a search and replace feature
I want to replace all occurrences of string in all elements with another

Does such a feature exist?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: search and replace
« Reply #1 on: March 12, 2021, 09:21:42 pm »
To my knowledge: no. You would need to write a script.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: search and replace
« Reply #2 on: March 12, 2021, 09:49:35 pm »
I think someone once made some kind of tool to do that, but I don't remember who or where.

I'm pretty sure you should find some references to that in one of the forum posts.
Possible alternative solution: export to xmi, search/replace in notepad, import xmi

Be careful when doing search and replace. If your search string is not exact enough, you might end up replacing too much.

(e.g. you want to replace "car" with "automobile", but you end up changing "careful" to "automobileeful")

Geert

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: search and replace
« Reply #3 on: March 12, 2021, 09:51:29 pm »
Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: search and replace
« Reply #4 on: March 15, 2021, 08:00:00 am »
If you're careful, you can export to XMI, edit the XMI in a text editor, and re-import.
The Sparx Team
[email protected]

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: search and replace
« Reply #5 on: March 15, 2021, 05:53:58 pm »
Just to add another option, if your repository is eapx you can open in MS Access and use that search and replace.
Happy to help
:)