Book a Demo

Author Topic: Patterns and resulting element names  (Read 3189 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Patterns and resulting element names
« on: November 06, 2015, 02:38:01 pm »
When you instantiate a UML Pattern, you can individually change the name of the elements in the dialog.

Is it possible to globally search and replace the names so that if (for example)  I use: ¯Name¯ , I can say: everywhere there is "¯Name¯", replace with "Tiger"?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Patterns and resulting element names
« Reply #1 on: November 09, 2015, 10:41:02 am »
I don't believe that feature is available however you can do it via
a) JScript
b) SQL statement in Search Model

The latter using SQL would be faster and would look something like this if you have SQL Server as a repository
Code: [Select]
Update t_object Set Name = replace(Name, '_Name_', 'Tiger');


See more at: http://www.sqlteam.com/article/using-replace-in-an-update-statement#sthash.0t6xcRxu.dpuf

Alternatively if its an MS Access DB just open the repository in MS Access and do a search and replace on the Name in t_object table.

Probably best to back up your repository before doing it just in-case it goes pear shaped and you replace things unintentionally.

Hope that helps.
 :)
« Last Edit: November 09, 2015, 10:41:45 am by phenzell »
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Patterns and resulting element names
« Reply #2 on: November 09, 2015, 10:46:23 am »
Quote
I don't believe that feature is available however you can do it via
a) JScript
b) SQL statement in Search Model

The latter using SQL would be faster and would look something like this if you have SQL Server as a repository
Code: [Select]
Update t_object Set Name = replace(Name, '_Name_', 'Tiger');


See more at: http://www.sqlteam.com/article/using-replace-in-an-update-statement#sthash.0t6xcRxu.dpuf

Alternatively if its an MS Access DB just open the repository in MS Access and do a search and replace on the Name in t_object table.

Probably best to back up your repository before doing it just in-case it goes pear shaped and you replace things unintentionally.

Hope that helps.
 :)
Thanks Sunshine,
Over the years, I've done some of this.  However, that only implements the "Create" function of the Patterns process.  I was looking for the "Merge" mechanism to be enabled with global changes.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!