Book a Demo

Author Topic: Programatically create User Interface Diagram in EA  (Read 6599 times)

Martino

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Programatically create User Interface Diagram in EA
« on: April 04, 2016, 03:22:28 am »
Hi guys,

I´ve got a problem to code addition of a User Interface Diagram in my EA add-in. I know its type is "Custom" and metatype is "User Interface", but metatype attribute is read only. Can someone help me?

Thanks in advance

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Programatically create User Interface Diagram in EA
« Reply #1 on: April 04, 2016, 07:37:17 pm »
Hi Martino,

what do you mean with "code addition"? Adding a diagram to your model from an add-in?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Programatically create User Interface Diagram in EA
« Reply #2 on: April 04, 2016, 08:31:06 pm »
You do that by just adding the right stereotype from your MDG. That's it. The metatype is then created from what your MDG has placed there.

q.

Martino

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Programatically create User Interface Diagram in EA
« Reply #3 on: April 05, 2016, 06:02:15 pm »
yes, I need to add a user interface diagram to my model from add-in using EA API or UMLToolingFramework. Well, I am a novice in this area and I do not really understand what MDG is.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Programatically create User Interface Diagram in EA
« Reply #4 on: April 05, 2016, 06:20:51 pm »
The user interface diagram is one of the "standard" EA extended diagram types.
The type of diagram is defined by the second parameter in Diagrams.AddNew() You'll have to pass something like "EAExtended::User Interface" as the second parameter, but I don't know by heart the exact name of the type to add.
I'm pretty sure similar questions have been asked in the forum, so searching might provide an answer.


Geert

Martino

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Programatically create User Interface Diagram in EA
« Reply #5 on: April 05, 2016, 06:38:17 pm »
thanks for help, it works perfect with the diagram type "Extended::User Interface".