Sparx Systems Forum

Discussion => Uml Process => Topic started by: Polymorph on December 23, 2016, 12:03:03 am

Title: Find and Replace
Post by: Polymorph on December 23, 2016, 12:03:03 am
Is there any way to perform a find and replace for a text string within the "Notes" of an element?

Any of you scripting gurus got any suggestions if not?

Thanks!
Title: Re: Find and Replace
Post by: qwerty on December 23, 2016, 12:15:28 am
There are at least two ways (but none out of the box AFAIK). You can issue a simple SQL like
Code: [Select]
UPDATE t_<whatever> SET Notes=<newstring> WHERE <whatever>ID = <theId> with Repository.Execute. You can also use SQL string operations for a global change (I'm no SQL guru and don't know that by heart). The other way is to go via the API to find the element and change the notes right there.

q.
Title: Re: Find and Replace
Post by: Geert Bellekens on December 23, 2016, 04:31:51 am
There's also a free tool from Helmut Ortman out there that does find and replace.
Haven't tried it myself though.

Geert
Title: Re: Find and Replace
Post by: qwerty on December 23, 2016, 04:52:08 am
See https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki (https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki)

q.
Title: Re: Find and Replace
Post by: Helmut Ortmann on December 23, 2016, 05:18:23 pm
Hi,

an easy way is to:
- Export Package or Model as *.xml
- Using a text editor for search and replace (be careful not to change unwanted things)
- Import from *.xml

Kind regards,

Helmut