Author Topic: How to Make Diagram Element Property Fields Required Using MDGs  (Read 4677 times)

chesterw

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hello EA Sparx Community,

I am currently working on a project in Enterprise Architect and utilizing MDG Technologies. I need to ensure that some of the property fields for specific diagram elements are mandatory or required.

Could anyone guide me on how to configure these settings within MDGs? Specifically, I am looking for a way to enforce that certain properties must be filled out by users when they are creating or modifying elements.

For example, if I am creating a activity, the name of the activity must be filled out or you cannot create the activity.

Thank you in advance for your assistance!

Best regards,
Chester

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to Make Diagram Element Property Fields Required Using MDGs
« Reply #1 on: June 14, 2024, 08:05:22 am »
You would probably need in an add-in to check and eventually croak when a new element is created.

(there is no need to post the same question in two forums)

q.

chesterw

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: How to Make Diagram Element Property Fields Required Using MDGs
« Reply #2 on: June 19, 2024, 10:41:38 pm »
You would probably need in an add-in to check and eventually croak when a new element is created.

(there is no need to post the same question in two forums)

q.

Hi q, thank you for the reply! Could you elaborate a bit on how the add in could work?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to Make Diagram Element Property Fields Required Using MDGs
« Reply #3 on: June 21, 2024, 06:49:56 am »
Sort of ... You subscribe to the new-element-creation event and when your routine is called you simply check the contents and eventually croak. Geert has a nice description on "how to create an add-in in 10 minutes". (It takes a bit more than 10 minutes but within a day even I was able - with no Cxx and Windoze background.)

q.