Book a Demo

Author Topic: Diagram or element layout specification  (Read 3737 times)

stulk

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Diagram or element layout specification
« on: May 03, 2018, 10:37:46 pm »
Hi, I'm a brand new EA user and have probably forgotten more about UML than I currently know...

I've been looking into developing my own UML Profile and learning about shape scripts.  One thing I would like the ability to do is to have a diagram force a certain layout.  Specifically, I would like to have shapes of a certain type arranged in columns and "Stick" to each other.  The docking function sort-of gets me what I want, and the alignment functions let me manually do it, but I would like to have shapes "snap" to each other when placed, and stay "stuck" to each other as they are moved around.  For example, have a rectangular "category" shape and square "service" shapes.  Services stick to each other vertically and to a category, and categories stick to each other horizontally.  I can then pick up a whole column and move it elsewhere in the diagram.   In Visio, I can accomplish this with connector nodes, but I am looking to do something similar in EA. 

Also, is there a way to auto-generate a diagram?  For example, I have a list of services assigned to a category in a .CSV file.  I can import them as Services, but I would like to automatically generate the diagram as described above.

For bonus points, I'd like them sorted within a column by an attribute, either using an  "order" attribute or just alphabetically.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram or element layout specification
« Reply #1 on: May 03, 2018, 11:03:40 pm »
AFAIK you can not specify snapping (feature request below?). The only elements that (sort of) can snap are pools/lanes.

Regarding the import: there's nothing out of the box. Probably you could script it by adapting the CSV scripts from the EAScriptLib MDG.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram or element layout specification
« Reply #2 on: May 04, 2018, 05:29:57 pm »
Hello, and welcome to the forum.

Please note we're all EA users, not Sparx employees. Well, most of us anyway.

There is one feature that you might be able to tweak to get something like what you're after: Kanban diagrams. With a diagram in Kanban mode, you specify columns based on some element property (usually its Status, but IIRC you can use tagged values as well). When you subsequently drop elements onto the diagram, EA places them automatically.

The sticking thing, no. EA doesn't do that.

The only place I know where EA auto-generates diagrams is in source code import. But it's probably not worth it for you to define a language to match your import data in order to get EA to generate these diagrams. But if you want to give it a try, take a look at the grammar framework.

HTH,


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