I’m currently trying to create some links between drawingItems: I have to create multiple drawings of the same External reference, but I need to create the links from all these drawingItems to the operations it is connected to.
I managed to add all the drawingItems I needed, but only one of them has the links to the operations.
On the Diagram API PDF, I’ve found:
To add a path to diagram, all necessary objects and links must first be created in the
repository and the extremity objects must appear in the diagram. The center object of the top
level path must then be added. The remaining objects and links will be added automatically
and a path will be generated. It can then be accessed as previously.
But I Don’t understand which oAssociation should I use.
I’ve tried with these:
Set oAssociation = oroot.getobjectfromid("~iMBAYIKF9D54[_ExternalReference ExternalReferenceElement]")
Set oAssociation = oroot.getobjectfromid("~lMBAYIKF9P54[External reference]")
Set oAssociation = oroot.getobjectfromid("~kMBAYIKF9L54[Elemento con riferimento esterno]")
Set oAssociation = oroot.getobjectfromid("~aN54Q71NrC00[System External Referencing]")
But it always gives me this error:
Script Editor Default : MegaDrawing::MegaObjectInsert line 38, offset 1 :
Error(0x80020009) : Impossibile trovare l'oggetto MetaAssociationType. (or MetaAssociation or MetaAssociationEnd)
Error(0x80020009) : Impossible to find the MetaAssociationType (or MetaAssociation or MetaAssociationEnd) object.
Has anybody an idea on how to show all those links?
consider that a "path" is not a "metaassociation". Is a solid link done with an intermediate object (like Sequence Flow in BPMN).
To add a link (metaassociation) it is enough to add a DrawingLink. The link from the object will be automatically connected.
But, if your object it is many time in the diagram then you have to specify the point of the DrawingLink, or you will see many time the same link in the diagram.
Look first at Exchange - API document, then open an itialization macro for a DiagramType (you will fount it under the DiagramTypeZoom). The best choice is Application Environment Diagram, here you can see how links for messages are put. (Remember that a Message is not a "Path" is a simple object with two links.