Book a Demo

Author Topic: Diagram script with MDG Technology  (Read 6564 times)

JoMa

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Diagram script with MDG Technology
« on: May 02, 2016, 09:04:54 pm »
Hello,

I've created a MDG Technology containing scripts. One script is a diagram script. Unfortunately the MDG Technology seems to not support diagram scripts. Is there any solution or is this a bug?

Thanks,
Markus

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram script with MDG Technology
« Reply #1 on: May 02, 2016, 09:17:33 pm »
Hi Markus,


That's a bug. Or let's call it a missing feature.  :)

All script groups in an MDG Technology project get flattened into a single group with the MDG Technology's name when deployed.
This means you can't deploy diagram or browser scripts in an MDG Technology.

The workaround is to write all the functionality into a regular script, and then write minimal diagram/browser scripts which call the regular script in each project where you need them.


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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram script with MDG Technology
« Reply #2 on: May 02, 2016, 09:25:26 pm »
And of course you could include a script called "setup" or something that creates the appropriate Diagram group scripts.

I've written some reusable wrapper classes in VBScript here:
https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Framework/Wrappers/Scripting

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Diagram script with MDG Technology
« Reply #3 on: September 06, 2016, 09:39:44 pm »
Hi Geert,

Once the MDG has been installed, do you think that a setup script could move scripts from the MDG to a new Diagram Group?
Have you got a script available that moves scripts from the MDG scripts group to newly created groups?

I was thinking of running a SQL update instead but I cannot find the MDG scripts within the t_script table. Having the MDG imported in the model, I'm expecting it to be stored somewhere in the EA DB but haven't found it yet...

Thanks,
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram script with MDG Technology
« Reply #4 on: September 08, 2016, 08:06:06 pm »
Hi Guillame,

I don't have a script to do so. The scripts are actually not stored in the script table, they remain in the MDG file, which is in this case not stored on the file system, but in t_document.
So you should be able to read the contents of the mdg file and use my scripts to parse out the actual script.
Then you might need to use an sql update in order to create a new script and group.

Geert