Book a Demo

Author Topic: Automatically formatting classes/objects?  (Read 3535 times)

mmo

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Automatically formatting classes/objects?
« on: July 24, 2014, 02:23:56 pm »
I am drawing a rather large class diagram and it would be handy, if EA could automatically format (e.g. assign a specific fill color) to objects that fulfill a specific condition (in my case: classes that implement a specific method or interface). Is that easily doable or would that require some scripting? And if the latter: can one trigger scripts to automatically run, e.g. when opening a diagram?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Automatically formatting classes/objects?
« Reply #1 on: July 24, 2014, 03:49:30 pm »
I guess you'll have to write a script/add-in to do so.
EA has a number of events that you can use to execute your add-in code before or after certain manipulations in EA. You could be able to find an event that gets triggered when opening a diagram.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Automatically formatting classes/objects?
« Reply #2 on: July 24, 2014, 06:27:25 pm »
Or you stereotype those elements accordingly and assign shape scripts which do the formatting.

q.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Automatically formatting classes/objects?
« Reply #3 on: July 25, 2014, 09:07:27 am »
As qwerty says, and you can write the shape script to react according to the setting of an element property, although I'm not sure you can get it as finely-tuned as the situation you have described here.
Best Regards, Roy