Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Aric Rohner on April 10, 2014, 06:25:38 am
-
Anyone know why the connector DiagramID always has a value of 0 in the following function? Is there an alternative way to find out what diagram a connector is shown on?
function describeConnector( cnxn ) {
var cnxn as EA.Connector;
Session.Output( cnxn.ID + ", " + cnxn.Stereotype + ", " + cnxn.DiagramID );
}
Here is a sample of the output.
ConnectorID=1932, Stereotype=RDA_Includes1..1, DiagramID=0
ConnectorID=1954, Stereotype=RDA_RefersTo, DiagramID=0
ConnectorID=1948, Stereotype=RDA_Includes0..1, DiagramID=0
-
DiagramID property is Long type, but a connector can be shown in several diagrams, so it seems DiagramID is not the suitable way to find the diagram(s) in which a connector is shown.
-
MMoya is right. There's quite some rubbish left in the API. To find out where a connector is shown you need to
- find all diagrams where client and target are located
- check if it's not suppressed via DiagramLinks
Very tedious.
q.
-
MMoya is partially right.
It's not used except for Communication Messages and Sequence messages. These messages only appear on one diagram (because they are representing a single sequence each) and will have their diagramid set.
-
MMoya is partially right.
It's not used except for Communication Messages and Sequence messages. These messages only appear on one diagram (because they are representing a single sequence each) and will have their diagramid set.
Ha! Some new info for my Inside book :)
q.