Book a Demo

Author Topic: Replace element throughout model?  (Read 6110 times)

Wowbagger

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Replace element throughout model?
« on: September 09, 2009, 02:47:49 am »
I have a model in which we have decided that object FOO, which appears throughout the model, really should have been object BAR.

Both FOO and BAR already were present in the model.

What I'd like to do is say "Globally search and replace all links to FOO with links to BAR", thus updating all diagrams and relationships at once.

Is there a way do to this?

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Replace element throughout model?
« Reply #1 on: September 10, 2009, 09:21:34 pm »
Fastest an esiest way would be through DB, but you better now what you'r doing there.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Replace element throughout model?
« Reply #2 on: September 10, 2009, 09:24:26 pm »
I don't think there is an option in EA to do so, but you definitely can write a little script to do so.
I had to do something similar to fix some issues where elements that were supposed to be in a shared model had been imported usign the "strip guid" option.
Basically you start from FOO
then you search and replace the ElementID of FOO with the elementID of BAR for all
- Connectors connected to FOO
- DiagramObjects showing FOO
- Attributes that have FOO as their type
- Parameters that use FOO as their type

Geert