When cloning a structure in Sparx Enterprise Architect (EA) as a new version, that contains at least one diagram, every newly created diagram (clone) gets quickly opened and closed again during cloning process. In EA v14.1 build 1429 the EA_OnPostOpenDiagram
events can be caught successfully however the EA_OnPostCloseDiagram
are not thrown by EA in this case.
I figured this out during debugging. To reproduce execute the following steps.
- Create a new package
- Create a new diagram in the package
- Right click on the package in the project browser
- Click
Clone Structure as New Version …
- Enter an arbitrary value for
Name
andVersion
- Diagram gets cloned, the clone gets opened and closed again
When debugging, you’ll see, that only the EA_OnPostOpenDiagram
gets called but not the EA_OnPostCloseDiagram
. However the diagram gets opened AND closed, so both events should be triggered.
I submitted a bug report at 26.10.2020. In the meantime the bug got confirmed by Sparx Systems and according them it should be fixed in a future release (Issue ID: 20106112).