Book a Demo

Author Topic: Prevent duplicate names  (Read 4311 times)

Jacob Vos

  • EA User
  • **
  • Posts: 108
  • Karma: +0/-0
    • View Profile
Prevent duplicate names
« on: September 25, 2013, 07:40:55 pm »
Is there a way to prevent the existence of the same names for the same kind of element? For example: names of classes must be unique; names of diagrams must be unique.

If this is not possible: is there a way to raise a warning?

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Prevent duplicate names
« Reply #1 on: September 25, 2013, 08:24:13 pm »
Dear Jacob,

it is possible by automation to prevent the saving of a doubled name within a repository and call up a warning/or force to a new naming.

Therefore you need to use the broadcast events (...created/...modified) and query the repository for the objects type and name.  


Regards

Stefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Prevent duplicate names
« Reply #2 on: September 25, 2013, 08:45:04 pm »
So you'll need to write an add-in that catches those broadcasted events, and acts accordingly.

Geert

Jacob Vos

  • EA User
  • **
  • Posts: 108
  • Karma: +0/-0
    • View Profile
Re: Prevent duplicate names
« Reply #3 on: September 25, 2013, 10:07:12 pm »
@Stefan, Geert: Thanks. (I wished there was an easier way to guard the quality of a conceptual model...)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Prevent duplicate names
« Reply #4 on: September 26, 2013, 01:32:32 am »
IIRC it has been requested in the past to have unique names in one namespace. The fact that it is not realized yet speaks for itself.

OTOH I find it a good solution to put that kind of task into add-ins. Would be nice to have some kind of "app store" where you could purchase such little things for a few pennies.

q.
« Last Edit: September 26, 2013, 01:34:43 am by qwerty »