Author Topic: Replace element  (Read 819 times)

KevinMcClusky

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Replace element
« on: April 06, 2011, 09:28:23 pm »
Is it possible to replace an element (in this case an Actor) with another, but keep the existing links?

skiwi

  • EA Practitioner
  • ***
  • Posts: 1772
  • Karma: +36/-58
    • View Profile
Re: Replace element
« Reply #1 on: April 07, 2011, 07:01:19 am »
Why?
AFAIK only by manually moving all the links from the old to the new.
You can change the type of the object.
Orthogonality rules
Using EA14.0 (1422) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2014 R2 & Access2003/JET4.0

i4mdone

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Replace element
« Reply #2 on: June 23, 2018, 02:24:36 am »
Here is a good Why regarding replacing an existing element:

Background: this is very pertinent in today's Agile world of best practice techniques

Scenario:  modeling iteratively, your initial models may be generic "components or mechanisms" that are suitably named but is really part of the initial brainstorming iteration - most notably the Sparx diagram appearance mode of hand drawn and/or whiteboard reinforces the spirit of this. 

In the next set of iterations as you get more firm on concepts and ideas, there may be cases where replacing the "generic brainstorming element" with an existing element (with existing attributes and relationships) may be warranted.  Certainly there will be many cases where continuing to refine the "generic brainstorming element" into a more defined element will be beneficial, and this is clearly supported by Sparx, but the former case of replacing with an existing element definitely has a place in iterative modeling.
« Last Edit: June 23, 2018, 02:32:58 am by i4mdone »

Richard Freggi

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-3
    • View Profile
Re: Replace element
« Reply #3 on: June 23, 2018, 12:47:55 pm »
You should be able to change the instance classifier of UML elements with right-click context menu in diagrams (why you can't do it in project explorer is beyond me).  So your element becomes an instance of some other classifier.

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Replace element
« Reply #4 on: June 23, 2018, 11:27:51 pm »
You should be able to change the instance classifier of UML elements with right-click context menu in diagrams (why you can't do it in project explorer is beyond me).  So your element becomes an instance of some other classifier.
IIRC Ctlr-L works everywhere. But that works only for instances->classifier, not vice versa.

q.

Richard Freggi

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-3
    • View Profile
Re: Replace element
« Reply #5 on: June 24, 2018, 01:56:05 am »
You should be able to change the instance classifier of UML elements with right-click context menu in diagrams (why you can't do it in project explorer is beyond me).  So your element becomes an instance of some other classifier.
IIRC Ctlr-L works everywhere. But that works only for instances->classifier, not vice versa.

q.

Good tip QWERTY!  Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Replace element
« Reply #6 on: June 24, 2018, 07:16:11 am »
And of course you're right: EA menus are as weird as, ehrm, was it me?

q.

ngong

  • EA User
  • **
  • Posts: 128
  • Karma: +0/-2
    • View Profile
Re: Replace element
« Reply #7 on: June 24, 2018, 06:42:58 pm »
I ran to this question a lot of times.
I feel that question of KevinMcClusky and i4mdone has not been successfully addressed yet.

Couldn't be there a script or plugin helping with boring task of moving all links from on element to another. Restrictions may apply like "the new element should be kind of same classifier".
Rolf

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1136
  • Karma: +83/-72
    • View Profile
Re: Replace element
« Reply #8 on: June 25, 2018, 07:30:58 am »
Why?

Well, how about when you import a whole bunch of Visio pictures and suddenly end up with dozens of copies of the 'same' element.

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 301
  • Karma: +9/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Replace element
« Reply #9 on: June 25, 2018, 10:03:44 am »
I ran to this question a lot of times.
I feel that question of KevinMcClusky and i4mdone has not been successfully addressed yet.

Couldn't be there a script or plugin helping with boring task of moving all links from on element to another. Restrictions may apply like "the new element should be kind of same classifier".

Shouldn't be hard to create one, but there must be some way to do auto lookup (e.g. elements having same name, or someway to get the IDs of the old and new elements)