Book a Demo

Author Topic: Create GUIDs  (Read 5673 times)

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Create GUIDs
« on: April 27, 2010, 11:27:49 pm »
Hi all,

Can someone tell me how I can create a GUID? I'm still on my previous task of creating composite diagrams and understand now that I need to create an entry in the t_xref table - one of the fields of which, is the GUID of that entry.

I've seen a couple of posts from people with similar problems - the closest is from Paolo saying "from your local GUID dealer :D", but he doesn't say where he lives  ;)

Any ideas?

TIA
Martin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create GUIDs
« Reply #1 on: April 27, 2010, 11:43:32 pm »
Depending on the language you are using there is definitely some GUID library available.
Google is your friendtm

Geert

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Create GUIDs
« Reply #2 on: April 27, 2010, 11:48:26 pm »
Hi Geert,

Are you saying that any GUID can be used? What about those that already exist in the model? How do I prevent a clash?

Martin

(I'm using VB, btw)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Create GUIDs
« Reply #3 on: April 28, 2010, 12:34:24 am »
Quote
Hi Geert,

Are you saying that any GUID can be used? What about those that already exist in the model? How do I prevent a clash?

Martin

(I'm using VB, btw)
No, he's not.  He's saying that any GUID generated by an appropriate GUID generator can be used.

It should be in the nature of GUIDs that the chances of generating one that clashes with an existing one is vanishingly small.

GUIDs are also known as UUIDs.  As Geert suggests look them up in your favourite search engine.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Create GUIDs
« Reply #4 on: April 28, 2010, 12:47:42 am »
Thanks guys [smiley=thumbsup.gif]

It was just the understanding of what EA was doing with the GUIDs that I wasn't sure about. I can now move a little further on with my design!

Martin

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Create GUIDs
« Reply #5 on: April 28, 2010, 08:45:41 am »
Quote
(I'm using VB, btw)
In Visual Studio 2008 use Tools > Create GUID (other versions of VS will have the same or similar)
The Sparx Team
[email protected]

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Create GUIDs
« Reply #6 on: April 28, 2010, 07:03:45 pm »
Sorry - should have been ultra clear - VB6. But found a couple of routines by googling.

Thanks