Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Dave.B on October 28, 2009, 01:22:34 am

Title: Relating diagram objects to diagram links
Post by: Dave.B on October 28, 2009, 01:22:34 am
It is not immediately obvious to me how a diagrams objects can be related to their associated diagram links. Any suggestions?

I specifically want to change the style of the links associated with the selected objects in a diagram.

Thanks
Dave B.

Title: Re: Relating diagram objects to diagram links
Post by: Paolo F Cantoni on October 28, 2009, 09:55:53 am
Hi Dave,

In EA, believe it or not, they are NOT directly related...  There was some discussion about it within the last three months - look for Diagrams as first class elements (I think).

Basically, you need to iterate the diagrams diagram links collection until you find the diagram link that refers to the connector you are seeking.

Check out the original post and add your vote...

HTH,
Paolo
Title: Re: Relating diagram objects to diagram links
Post by: Dave.B on October 28, 2009, 08:24:33 pm
Paolo,
Do you mean this discussion: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1250730910? Anything that improves the ease by which simple scripts can be created to do jobs that EA does not directly do gets my vote!

It strikes me as being a right pain in the a*** that I am forced to now write (and debug) a sophisticated script that can relate the DiagramLinks to the (selected) DiagramObjects. Any tips anyone?

Regards
Dave B.
Title: Re: Relating diagram objects to diagram links
Post by: Geert Bellekens on October 28, 2009, 09:06:07 pm
Dave,

Just so you know, EA does not create a diagramLink for every representation of a relation on a diagram.
So if you want to loop all links shown on a diagram you'll have to look at all the connectors between the elements displayed on the diagram.

Geert
Title: Re: Relating diagram objects to diagram links
Post by: Paolo F Cantoni on October 29, 2009, 12:02:04 am
Quote
Paolo,
Do you mean this discussion: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1250730910? [size=18]...[/size]
No, sorry Dave, I sent you on the wrong chase... I meant:

Need DiagramObject.DiagramLinks collection (http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1248939760)

which directly addresses the issue.

HTH,
Paolo
Title: Re: Relating diagram objects to diagram links
Post by: Dave.B on October 30, 2009, 01:26:54 am
Paolo
Your link to the other discussion thread is exactly what I need! I'll post my vote there right now.

Thanks
Dave B.
Title: Re: Relating diagram objects to diagram links
Post by: Paolo F Cantoni on October 30, 2009, 12:19:39 pm
Quote
Paolo
Your link to the other discussion thread is exactly what I need! I'll post my vote there right now.

Thanks
Dave B.
You may want to submit another feature request - use the same name and just point Sparx at the Topic.  I suspect that Sparx react more to formal postings than merely mentions on the forum.

We users, over the years have adopted the pattern of:
However, it seams to me that until we get a formal voting mechanism that provides direct feedback to Sparx, we should add:
My AU$0.05
Paolo