How Are UIDs Generated

E

ET902

Specifically, working with Master and Subproject Files, how should the
Subprojects UIDs reflect in the Master and how are those numbers generated?
 
J

Jim Aksel

All UniqueIDs are machine generated, nothing we can do about it.
Within a file, the UniqueID is generated sequentially and the UID of a
deleted task is not reused.

When an mpp is inserted into another file as NOT linked, the inserted file
generates UIDs in accordance with the master file (indeed it is just like you
typed all the tasks).
No mystery just yet .... just increasing numbers.

So, now you insert the file as LINKED and the UIDs of the inserted file are,
well, unique. The first summary line follows the pattern as same as the
master file. The remaning lines have a large UID (somehow system generated).
The best I can tell is that they appear to honor the underlying file UID by
a fixed offset. So, if a UID of a deleted task is missing in the underlying
file, there will be a skip in the large UID as well. Sorry, I don't have an
algorithm for you.. perhaps one of the other regular posters will enlighten
us.

I need to go fishing for these UIDs myself. So here is what we did to get
around it.
In a spare text column, add a formula (Right Click on a column heading,
select customize fields, then Formula).

In the spare field we generate a 4 letter code (or anything else you want).
So we use SoSE for "System of Systems Engineering". It specifically
identifies the file and we make sure each file has a unique code. So, then
the Text1 field formula becomes:
"SoSE" + [UniqueID]. In the Master file, the formula is "MSTR" +
[UniqueID], in the Core Assets file we use "CAIC" + [UniqueID].

So now, in the Master Project File, The text1 column goes MSTR1, MSTR2..
until we get down to the first inserted file, then it changes to SoSE1,
SoSE2, etc. while the SoSE uniqueID column shows 8386113.. This way, we use
the Text1 field to truly identify our intentions when we speak about
different files and their tasks. As you know, the TaskID numbers walk all
over the place... but SoSE1123 does not change...

Probably didn't really answer your question, but hopefully I provided some
useful information. I assume you are asking the question becuase you want to
do something with the UIDs rather than just wanting to know how Project
generates them in a master file.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
J

Jack Dahlgren

It is true, they are offset by a multiple of a certain fixed number. I can't
recite it off the top of my head, but it is large and starts with 4. Take a
master project and insert two projects with a single task each and you
should be able to figure out what the number is by simple math.
 
E

ET902

Jim and Jack, Thanks for the input.

What it looks like I am discovering is that not only are the UIDs generated
just for the file, but when they are inserted it looks like there may be a
system generated dynamic from the home computer that the the original file
being inserted was created on. So the offset is not always the same. So if I
go grab some files that I have recived from different creators, created on
different machines, the offset on each of those files is different. So it
looks like simple math it out.

You were right Jim in that I was not just wondering where the numbers come
from out of MS Project Heaven, but I was trying to pin them down for
different analysis purposes. The method you suggested will definately work,
provided we can get all of the creators to use the same formula in a common
field

Jim Aksel said:
All UniqueIDs are machine generated, nothing we can do about it.
Within a file, the UniqueID is generated sequentially and the UID of a
deleted task is not reused.

When an mpp is inserted into another file as NOT linked, the inserted file
generates UIDs in accordance with the master file (indeed it is just like you
typed all the tasks).
No mystery just yet .... just increasing numbers.

So, now you insert the file as LINKED and the UIDs of the inserted file are,
well, unique. The first summary line follows the pattern as same as the
master file. The remaning lines have a large UID (somehow system generated).
The best I can tell is that they appear to honor the underlying file UID by
a fixed offset. So, if a UID of a deleted task is missing in the underlying
file, there will be a skip in the large UID as well. Sorry, I don't have an
algorithm for you.. perhaps one of the other regular posters will enlighten
us.

I need to go fishing for these UIDs myself. So here is what we did to get
around it.
In a spare text column, add a formula (Right Click on a column heading,
select customize fields, then Formula).

In the spare field we generate a 4 letter code (or anything else you want).
So we use SoSE for "System of Systems Engineering". It specifically
identifies the file and we make sure each file has a unique code. So, then
the Text1 field formula becomes:
"SoSE" + [UniqueID]. In the Master file, the formula is "MSTR" +
[UniqueID], in the Core Assets file we use "CAIC" + [UniqueID].

So now, in the Master Project File, The text1 column goes MSTR1, MSTR2..
until we get down to the first inserted file, then it changes to SoSE1,
SoSE2, etc. while the SoSE uniqueID column shows 8386113.. This way, we use
the Text1 field to truly identify our intentions when we speak about
different files and their tasks. As you know, the TaskID numbers walk all
over the place... but SoSE1123 does not change...

Probably didn't really answer your question, but hopefully I provided some
useful information. I assume you are asking the question becuase you want to
do something with the UIDs rather than just wanting to know how Project
generates them in a master file.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project



ET902 said:
Specifically, working with Master and Subproject Files, how should the
Subprojects UIDs reflect in the Master and how are those numbers generated?
 
J

Jim Aksel

Glad I could help. You may want to use this formula... what it does is left
fill the UniqueID with zeros so that the entire code is always the same
length. It looks nicer on the screen and makes it easier to read.

"ABCD"+choose(len([Unique ID]),"000","00","0","")+trim(str([Unique ID]))

ABCD is the code of your choice and can be any length
The rest of it concatentates the leading zeros. In this case, if the
UniqueID exceeds 9999 you would then have a length issue. I think the method
to correc that is pretty obvious--- add "0000", where it looks like it wants
to be.

What is happening here is the choose command determines the length (not
magnitude) of the UniqueID. Base on the length in characters, it places the
appropriate number of zeros. Since they are strings you can make them
anything you want as well.

We establish a fixed formula and text field by edict, rejecting any file
without it. Harsh, but it works.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project



ET902 said:
Jim and Jack, Thanks for the input.

What it looks like I am discovering is that not only are the UIDs generated
just for the file, but when they are inserted it looks like there may be a
system generated dynamic from the home computer that the the original file
being inserted was created on. So the offset is not always the same. So if I
go grab some files that I have recived from different creators, created on
different machines, the offset on each of those files is different. So it
looks like simple math it out.

You were right Jim in that I was not just wondering where the numbers come
from out of MS Project Heaven, but I was trying to pin them down for
different analysis purposes. The method you suggested will definately work,
provided we can get all of the creators to use the same formula in a common
field

Jim Aksel said:
All UniqueIDs are machine generated, nothing we can do about it.
Within a file, the UniqueID is generated sequentially and the UID of a
deleted task is not reused.

When an mpp is inserted into another file as NOT linked, the inserted file
generates UIDs in accordance with the master file (indeed it is just like you
typed all the tasks).
No mystery just yet .... just increasing numbers.

So, now you insert the file as LINKED and the UIDs of the inserted file are,
well, unique. The first summary line follows the pattern as same as the
master file. The remaning lines have a large UID (somehow system generated).
The best I can tell is that they appear to honor the underlying file UID by
a fixed offset. So, if a UID of a deleted task is missing in the underlying
file, there will be a skip in the large UID as well. Sorry, I don't have an
algorithm for you.. perhaps one of the other regular posters will enlighten
us.

I need to go fishing for these UIDs myself. So here is what we did to get
around it.
In a spare text column, add a formula (Right Click on a column heading,
select customize fields, then Formula).

In the spare field we generate a 4 letter code (or anything else you want).
So we use SoSE for "System of Systems Engineering". It specifically
identifies the file and we make sure each file has a unique code. So, then
the Text1 field formula becomes:
"SoSE" + [UniqueID]. In the Master file, the formula is "MSTR" +
[UniqueID], in the Core Assets file we use "CAIC" + [UniqueID].

So now, in the Master Project File, The text1 column goes MSTR1, MSTR2..
until we get down to the first inserted file, then it changes to SoSE1,
SoSE2, etc. while the SoSE uniqueID column shows 8386113.. This way, we use
the Text1 field to truly identify our intentions when we speak about
different files and their tasks. As you know, the TaskID numbers walk all
over the place... but SoSE1123 does not change...

Probably didn't really answer your question, but hopefully I provided some
useful information. I assume you are asking the question becuase you want to
do something with the UIDs rather than just wanting to know how Project
generates them in a master file.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project



ET902 said:
Specifically, working with Master and Subproject Files, how should the
Subprojects UIDs reflect in the Master and how are those numbers generated?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top