Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - michielper

Pages: 1 [2] 3 4 ... 10
Hi Geert,

I compared my solution with yours and the problem seems to be that I chose the project as .NET Standard instead of .NET Framwork Class Library.
Now the Add-In works as expected.
Thanks for help!


I have the same problem and cannot find where to choose the project type in "Blend for Visual Studio".....

Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins:


I am using "Microsoft Blend for Visual Studio" on Windows 10. Your instructions seem to use another version, e.g. there is no "System.Windows.Forms" in my configuration.

Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins:


Yes, I saw this and will exeriment. I have nothing against C# but isnt VBA the default scripting language in EA?

I guess so, if your write an add-in that shows the image editor in the main view.

I'm pretty sure you should be able to find some kind of ready-made component you can use as image editor.


Thanks! My problem is how to create an EA plugin that
1. takes the picture (or some identification of it) as an input argument,
2. then does its thing and
3. then writes a new version of the picture (on file)
4. such that it becomes visible in EA and in generated reports.

Is there a manual on how to create EA plugins?

Regards, Michiel

Hey guys,

I've got a number of modellers working mainly with activity diagrams. The deliverables are Word documents, generated by means of a script. The problem is that the diagrams tend to get too large to be squeezed onto a single page.

I've been trying to work out a solution for this, which has resulted in a couple of Bugs&Issues posts, but I can't find a way forward that doesn't require a serious amount of manual editing of either the diagrams, or the resulting document, or both.

The template that outputs the diagrams is very simple, just a package>element>diagram>{Diagram.DiagramImg} thing. The script simply calls DocumentGenerator.DocumentElement().

My script checks the diagram's page orientation. I've found that applying a landscape version of the same template doesn't work, but if I instead InsertBreak(section) and SetPageOrientation() before and after a landscape diagram, using the portrait version of the template nearly works: the diagram is placed on a landscape page, although the document gets an unrequested blank page before the diagram.

So if the issue is that the diagram is too wide, we can get it out. It requires a needlessly complex set of GUI interactions for the modellers:
  • Open the diagram properties
  • Select the Diagram tab
  • Click the Advanced... button
  • Click the Page Setup button
  • Click the Landscape radio button
  • Click OK
  • Click OK
  • Click OK
... but it works.

But when that isn't enough, what do I do?

Divide Diagram into Multiple Pages doesn't work. And doesn't work.

Forcing the modellers to restrict their activity diagrams to what can fit on a page is not acceptable.

There are operations in Project and Diagram to get images from a diagram -- but there's nothing in DocumentGenerator to insert an image into a document.

Is it possible to use DocumentGenerator.DocumentCustomData() to insert image data? If so, how should it be encoded?

Is there another way of getting images into a document? Maybe via the image library or some magic template fragment?

Or is there some other way of getting this done?



I had the same problem. One way to deal with this is through a (very) small script in Word that resizes the picture if it is too large and which you run directly after saving the RTF file as docx. This is how I do it. I found that running some script(s) in Word is useful anyway, also e.g. to fix line- and pagebreaks at odd positions.

Automation Interface, Add-Ins and Tools / Plugin to edit pictures
« on: May 15, 2020, 07:10:24 pm »
I am looking for a way to let a user edit a picture (not a diagram!) in EA with an external editor. A sort of plug-in. Is this possible?

Thanks for any tips and tricks!


I have been experimenting and running into propblems with simulations in SysML and UML State and Activity models with the goal of using such simulation for strengthening the faith in dynamic models.

The models I want to use are semi-complex. They consist of subsystems such as signaling lights, movable bridges, sensors, etc. And there is a central system that must control the actuators and receive data from the sensors. This is clearly a multithreaded environment.

I have tried to model this with State Diagrams using the existing Petrinet-like semantics where a Join will only "fire" when all its input states are active. In this way you can create a model where each action consists of entering a "command" state by the central control parallel with entering a "wait" state. The appropriate subsystem waits until the "command" state (that for this purpose is repeated (linked) on the subsystem diagram) enables one of its Joins (Transitions in Petrinet language) and consumes the Command state. After finishing its work in its own thread, it enters a "Confirmation" state that is consumed by the Control thread so that it leaves the Wait state..... Etcetera. The different state machines are started each in their own thread from a Startup state machine in whose diagram I have linked the various Entry elements.
The whole model is not extremely simple but no rocket science either.

This works a bit but not well enough to be useful. I run into all sorts of strange problems. Inexplainable repetitions in the simulation log, inexplainable paths taken, halting of the simulation for no apparent reasons, etc. This also seems to depend on the way in which you organise the model with packages, nested elements, state machines etc. But I have not found a good way to make this work.

I have tried the same idea using Activity Charts but that gives different but similar problems that are also difficult to reproduce exactly.... I have the impression that the semantics of the Fork/Join element is not completely clear (at least to me...).

Of course, I have also tried to use Javascript to set global variables instead of communicating through shared States or Actions. However this leads to models that are very difficult to debug and maintain. And also to multithreading problems similar to those mentioned above.

So, my question is, are there other EA users who have tried similar simulations with multithreaded models and what is their experience and advice?

Regards, Michiel

I have read that it is possible to create COM objects with Javascript in a simulation (e.g. of a State Machine). And it should even be possible to communicate between an EA simulation and another application or system, using these COM objects. However, the documentation on this is not sufficient to understand how to do this.

So, my question is: How do I create and use a COM object to communicate via a serial port (USB) from a simulation?

General Board / Re: pro cloud server versus EA Editions
« on: April 24, 2020, 07:24:24 pm »
The Pro Cloud Server can't run simulations by itself. It wouldn't be useful at all by itself.

There's no entry in the EA feature table that requires ultimate for simulation.

Simulation of UML Activity and State Machines with Javascript evaluation is available and Corporate and above.

BPMN and SysML simulation need the Unified edition and above.

Hi, sorry to keep nagging, but I am new to the Pro Cloud server. My understanding so far is the following. Can you confirm?

  • When I install a Pro Cloud server (e.g. on my own infrastructure) then the version that I can run is the Corporate Edition, right?
  • In order to be able to fully edit my models, I need to install the EA fat client on my PC, right?
  • On this local client, I can run simulations of UML activity and state models with javascript evaluation, right?

Then I have another question:
We actually use SysML, not UML. There is no real difference between UML and SysML state and activity charts, except that the latter will be integrated in our SysML models.
  • Will I be able to run simulations of these activity and state models in my SysML models?
  • What is SysML Parametric Model Simulation?
  • What is SysML Simulation with OpenModelica?

Regards, Michiel

General Board / Re: pro cloud server versus EA Editions
« on: April 22, 2020, 08:26:59 pm »
Thanks for the help!

My conclusion so far is that when using a ProCloud server solution, it is not possible to run automatic simulations (with Javascript evaluations) in your model because for that you need the Ultimate Edition.

Is this conclusion justified?

General Board / pro cloud server versus EA Editions
« on: April 22, 2020, 12:13:32 am »
There are two comparison tables on the EA website:
containing a long list of detailed functionalities
containing a list of hosting features

It is unclear to me what the relationship is. Specifically, what are the functionalities of the Procloud editions? Or can I choose any of the EA editions in combination with the Procloud editions??

Very cool. I would like to see an example.....

Yes, it is possible. (In fact I once saw a demo where an EA simulation was driving an RC car)

You do this by creating a COM object from the simulation.
One very important feature of the implementation of JavaScript in Enterprise Architect's simulator is that it supports the creation of COM objects. This provides the ability to connect the running Simulation with almost any other local or remote process and either influence the Simulation based on external data, or potentially change data or behavior in the external world based on the current Simulation state (for example, update a mechanical model or software simulation external to Enterprise Architect). The syntax for creating COM objects is shown here:"Odd Even";
     var logger = new COMObject("MySim.Logger");
     logger.Log("Simulation started");

General Board / Send output of simulation to serial port or another program
« on: February 28, 2020, 07:53:56 pm »
Is it possible to send the output of a simulation (execution of state model or activity model or BPMN model etc.) to a serial port so that it can be used in another program on another computer?
Or, as an alternative, could the output of an execution be sent to another program on the same computer, perhaps via stdout/stdin or so?

My idea is to link Sparx EA to Blender 3D..... that should be fun!

Thanks for any suggestions!

General Board / Re: How to hide package names in class diagrams?
« on: November 22, 2019, 05:56:58 pm »
This does not seem to work in version 15! The namespaces remain visible despite the checkbox Shpw Namespace not being checked! >:(

It is available in version 15, so there's probably not much point reporting it.

The omission of such an essential element in the Archimate specification is a very serious problem!! Very strange also that is was present in Sparx 13 and then forgotten in Sparx 14.
I need it now, can I at least obtain a temporary version 15?

Pages: 1 [2] 3 4 ... 10