Author Topic: add-in an element  (Read 4482 times)

eliana

  • Guest
add-in an element
« on: July 19, 2005, 04:25:15 am »
Salve a tutti, ho un problema con l' Enterprise Architect e spero che qualcuno di voi ci sia già passato in modo da darmi un aiuto.
Devo aggiungere un elemento in un diagram ma per aggiungerlo ho bisogno di un ID da assegnarli. Il problema è che l' Id è univoco e dovrebbe essere creato automaticamente. In che modo posso dargli un ID univoco?
_________________________________________
Hi everybody
I have a question to pose you. I have to add a new element to a diagram by code, but to do this I need to give an Id to this new element. The problem is that the Id has to be unique and It should be created automatically. How can I give an Id to the element if I don't know it? ???
Sorry for my english  :P
Thank you
Eliana

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: add-in an element
« Reply #1 on: July 19, 2005, 03:57:48 pm »
Eliana,

If you are using the EA automation model, the element insertion methods will add the ref GUID's automatically.

If you aren't ... you should be.

If you still aren't, as long as you generate a GUID that will not collide with any of the EA generated ones (insert weeks of work here) it appears to work.  (here's a tip - no guarantee though - replace the least variant part of the generated GUID with a string which identifies "you" - so far this has worked for me  :-X )

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Rob_M

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Re: add-in an element
« Reply #2 on: July 19, 2005, 04:42:25 pm »