Book a Demo

Author Topic: Why would connector DiagramID always be 0?  (Read 6297 times)

Aric Rohner

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Why would connector DiagramID always be 0?
« 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?

Code: [Select]
function describeConnector( cnxn ) {
      
     var cnxn as EA.Connector;
     Session.Output( cnxn.ID + ", " + cnxn.Stereotype + ", " + cnxn.DiagramID );
}

Here is a sample of the output.
Code: [Select]
ConnectorID=1932, Stereotype=RDA_Includes1..1, DiagramID=0      
ConnectorID=1954, Stereotype=RDA_RefersTo, DiagramID=0      
ConnectorID=1948, Stereotype=RDA_Includes0..1, DiagramID=0      

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Why would connector DiagramID always be 0?
« Reply #1 on: April 10, 2014, 06:44:10 am »
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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Why would connector DiagramID always be 0?
« Reply #2 on: April 10, 2014, 08:22:57 am »
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.
« Last Edit: April 10, 2014, 08:23:41 am by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8098
  • Karma: +118/-20
    • View Profile
Re: Why would connector DiagramID always be 0?
« Reply #3 on: April 10, 2014, 09:10:34 am »
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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Why would connector DiagramID always be 0?
« Reply #4 on: April 10, 2014, 07:13:01 pm »
Quote
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.