Book a Demo

Author Topic: Connector question  (Read 3304 times)

SMaric

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Connector question
« on: November 10, 2011, 01:59:40 am »

Can    Connector .getDiagramID()     be used to identify which diagram the connecor is to be found on ?

I only ever seem to get zero returned

int diagId = conn.GetDiagramID();
Diagram diag = rep.GetDiagramByID(diagId);


Have just re-read the EA Help docs
Connector    GetDiagramID() returns a long
which is acceptable to
Repository GetDiagramByID (long DiagramID)

whereas  in my Java code
int org.sparx.Connector.GetDiagramID()
and
Diagram org.sparx.Repository.GetDiagramByID(int arg0)


Once again - any help gratefully received


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connector question
« Reply #1 on: November 10, 2011, 04:58:22 pm »
I think that will only work for things like sequence diagram messages, which are "bound" to a specific diagram.

Shouldn't be too hard to cast a long to an int should it?

Geert

SMaric

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Connector question
« Reply #2 on: November 11, 2011, 07:03:09 am »
Quote
Shouldn't be too hard to cast a long to an int should it?Geert

 :D ;D
Not exactly  what I was worrying about - rather the concern over the differences in the documentation

Besides    Long >> int == loss of precision/truncation doesn't it
(Not that it's likely to be a problem for identifiers - unless you have a massive system model)


Anyhow thanks for your response
SMaric