1
Automation Interface, Add-Ins and Tools / Re: Getting DiagramLinks from Sequence Diagrams
« on: October 04, 2005, 02:20:37 am »
<EDIT: Problem Fixed>
Managed to get hold of what i needed by getting the Elements from the DiagramObjects as above... then iterating through the connectors associated with this element checking them for
connectr.Type = "Sequence"
and
connectr.DiagramID = diag.DiagramID
This gets hold of all of the connectors i needed from the correct diagrams... even if it is 'going round the house' a bit
<END EDIT>
Problem is that when I iterate through the Diagram.DiagramObjects collection then use Repository.GetElementByID(DiagramObject.ElementID) to get the element it is returning items of type "object" so if i then use this to get the classifier and then try to get an element using this I get an error saying it cant find an element with that ID.
This is using 2 specific sequence diagrams from the EAExample.eap
The SE0002 setup sequence diagram has objects that are of type node, component etc... and links representing all of the operations.... this is fine
The CreateContact Diagram is the one i am interested in though and it returns objects of just type object in the DiagramObjects Collection.... and no links in the DiagramLinks Collection....which isnt of much use
In this diagram how are the operation calls stored? because i cant find them yet they are obviously there on screen...
Any ideas
Managed to get hold of what i needed by getting the Elements from the DiagramObjects as above... then iterating through the connectors associated with this element checking them for
connectr.Type = "Sequence"
and
connectr.DiagramID = diag.DiagramID
This gets hold of all of the connectors i needed from the correct diagrams... even if it is 'going round the house' a bit
<END EDIT>
Problem is that when I iterate through the Diagram.DiagramObjects collection then use Repository.GetElementByID(DiagramObject.ElementID) to get the element it is returning items of type "object" so if i then use this to get the classifier and then try to get an element using this I get an error saying it cant find an element with that ID.
This is using 2 specific sequence diagrams from the EAExample.eap
The SE0002 setup sequence diagram has objects that are of type node, component etc... and links representing all of the operations.... this is fine
The CreateContact Diagram is the one i am interested in though and it returns objects of just type object in the DiagramObjects Collection.... and no links in the DiagramLinks Collection....which isnt of much use
In this diagram how are the operation calls stored? because i cant find them yet they are obviously there on screen...
Any ideas