I’ve started looking at Enterprise Architect Automation because I need to figure out how to automate a process model driven generation (MDG) process that involves a number of manual steps.
EA does provide some capabilities which sound promising.
While this initially looked promising, its actually quite restrictive. There is no way to run and external program or make a web request from within the scripting engine. Effectively you are locked into IO with the EA application.
A better option appears to be the creation of a EA Addin. There was a nice tutorial on this here about how to create an addin in C#. This was easy enough to do. Within the C# library you have access to the same entities as the scripting language but of course you have complete flexibility in the library to make use of any libraries that you want to perform IO.
I was interested to create an addin which directly creates a Json Schema from a diagrams Object instances.
I found that in C# one can use the NewtonSoft.Json libraries to create JObject and JProperty instances and then serialize to Json using JsonConvert.SerializeObject.
As I was intending to serialize Object instances with Runstate, I found that RunState is only available as a string that needs to be parsed from a weird
The development life cycle is also problematic as each change requires a restart of EA for the new dll to be loaded.