Author Topic: Diagram: duplicate layout  (Read 5775 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Diagram: duplicate layout
« on: December 16, 2013, 11:41:55 pm »
Hi!

Here's a nifty little feature suggestion for you: duplicate diagram layout.
When invoked, this opens up a selector dialog that allows you to select a diagram.
It then runs through the current diagram and, for each element and connector that is present in both the current and the selected diagram, copies the layout.

Useful in situations where you want to show a subset (possibly annotated) of a diagram.
Yes, a selective copy/paste will do this - but only once. This feature would allow you to copy the layout at a later date, after the original diagram has changed.

/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Diagram: duplicate layout
« Reply #1 on: December 17, 2013, 02:03:35 am »
Sounds like a nice feature. Wouldn't it be nice to find that for a few Euros in an EA Store as plug-in? I guess it could be done with an add-in easily. And imagine you could bind that to an icon in the diagram toolbox...

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram: duplicate layout
« Reply #2 on: December 17, 2013, 03:25:32 am »
I'd be happy if you could bind an arbitrary Add-In menu command to a toolbar, the way you can with the built-in commands. That'd go a long way.

Putting the hacky hacky hack hat on, you could achieve a button-in-diagram-toolbox effect with an element stereotype which, OnPreNew, triggers a function, then returns false. Ewwww, I made a smelly..... But it should work! :)

A (mobile OS of your choice)-like marketplace for Add-Ins is a really cool idea. I doubt Sparx has the resources to spare to set something like that up though. Remember, it might be one of the biggest modelling tools out there, but it's still far from even a million users and you need a fairly big user and developer base to support an infrastructure like that.

As to the possibility of implementing this particular feature, well kinda almost. The problem is that the construct picker dialog opened by Repository.InvokeConstructPicker() only allows selection of elements, not diagrams. So you'd have to implement the diagram selection dialog yourself.

... I feel a feature request coming on...
My theories are always correct, just apply them to the right reality.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Diagram: duplicate layout
« Reply #3 on: December 18, 2013, 02:28:34 pm »
Or you could use filters and only have one diagram
Orthogonality rules
Using EA16.1 (1627) on Windows 11 Enterprise/64 bit. Repositories in SQLServer2019 DB Schema 1558.
WebEA on Pro Cloud Server 4.2.64

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Diagram: duplicate layout
« Reply #4 on: December 18, 2013, 09:05:08 pm »
That's only a work around. Also to include a diagram frame what I used quite often. But there you could not show relations to elements inside the diagram.

q.

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Diagram: duplicate layout
« Reply #5 on: February 08, 2014, 09:31:49 pm »
@Uffe

In terms of your layout - exactly what attributes
position, size, appearance?

nice little AddIn for a tutorial me thinks
EXploringEA - information, utilities and addins