Question

I need to use the EA Automation Interface from Java to create some diagrams in EA - something for which there are examples. However I also want to make some of the diagrams composite diagrams linked to an element in the model.

In EA itself it's just a question of right clicking on the element, selecting Add and then Select Composite Diagram but I can't see anywhere in the Automation Interface where I can create this relationship.

Does anyone know how to do this?

Was it helpful?

Solution

Element.IsComposite is read/write. Setting it to 1 will create a composite diagram of the appropriate type, unless the element already contains one (in which case that will become the composite diagram).

Element.CompositeDiagram, on the other hand, is read-only. So you can't first create a diagram in some arbitrary location in the model and then set the element to point to it.

OTHER TIPS

I know this is an old question but I stumbled upon it.

In EA v 13.0 Element.SetCompositeDiagram() was introduced and solves this question!

myElement.SetCompositeDiagram(DiagramGUID)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top