cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Numbering scheme with product attribute

Jo_shi
3-Visitor

Numbering scheme with product attribute

I am looking for a way to integrate an attribute into the numbering scheme for documents. The attribute is assigned to a product (project number). Each project number is unique and is entered into the corresponding field when the product is created. Each product should have its own generated 5-digit number.


Finally, the filenames and numbers should look as follows:

435698-10065 (Project number-generated number)


Can someone tell me how I can access the product's attribute in the project initialization rule?


Greetings,
Joshua

4 REPLIES 4
MikeLockwood
22-Sapphire I
(To:Jo_shi)

May or may not be something you really want to do - have to think about all long-term consequences - but could approach this way:

In each Product context, add the text to the OIR for EPMDocument as a prefix.

- Have to remember for a new product to create this OIR.

- It won't be "project-generated," just static text.

The numbers will continue to be pulled from a single sequence in the database, so using your example above in sequence this would result:

Designer 1: Create part in Product ABC: 435698-10065.prt

Designer 1: Create drawing in Product ABC: 435698-10066.drw

Designer 2: Create drawing in Product DEF: 738346-10067.drw

Designer 1: Create part in Product ABC: 435698-10068.prt

Seems like this may not be the best situation - all kinds of issues result from using part numbers with "meaning" and trying to accommodate.

Moving sometimes has to be done - the Number & filename would remain.

Renaming would allow the root number to remain but the prefix change or vice versa.

To take Mike's example one step further, if required, you could have a new sequence table in the DB for each project so you would get duplicate generated numbers with the different project numbers. The issue I see with this is that the part and the drawing have different generated numbers. Here, we have the same number and we let the file extension be their unique identifier: part 7001254.prt would be on drawing 7001254.drw.

Designer 1: Create part in Product ABC: 435698-10065.prt

Designer 1: Create drawing in Product ABC: 435698-10066.drw

Designer 2: Create drawing in Product DEF: 738346-10065.drw

Designer 1: Create part in Product ABC: 435698-10067.prt

Designer 2: Create part in Product DEF: 738346-10066.prt

Designer 3: Create part in Product GHJ: 925698-10065.prt

Designer 3: Create drawing in Product GHJ: 925698-10066.drw

BUT, the issues of rename, move and copy come into a long-term factor that may make this a mess.

Usually best to stick with a single sequential manual number scheme and let the software do any sort of project gathering of related files.

avillanueva
22-Sapphire I
(To:Jo_shi)

I have though for a long time if having Windchill assign part numbers was a good idea. I am often asked at work why we continue to use a old numbering system build 20 years ago and is in need of retirement. "Certainly, this should be simple for Windchill to do!". Yes and no. In our case, the project number is baked into part number field which means if we are using Oracle sequences, that's a sequence for each project (we have hundreds). I would not want to be that DBA. Not to mention, you have to sync with OIR rules by context.  Then there is the issue of junk uploads. Say I check in a massive assembly by mistake. With OIR rules, it would issue a part number for each of them. If you backed it out, your Oracle sequence just keeps marching on.

What I've come to realize is that numbering is a discrete event.  After items are worked on for a while and exist in the system, at some point you want to make them "real".  There should be a point were you assign numbers to them from an action by doing a rename/renumber.  The internal IDs do not change but the unique number field is altered.  You can have a listener that can propagate the numbers by any rules you want to related items. 

So, this still leaves you with a to do of creating your part numbering "logbook" system. It should be a simple system that ensure no duplication and follows the company rules.  I like the idea of keeping it at arms length from Windchill so that all you need to do is pass the resulting number back to Windchill and have it process the renumber action.

Jo_shi
3-Visitor
(To:Jo_shi)

Thank you Mike Lockwood, Ben Loosli and Antonio Villanueva for your thoughts on my question!

Regarding the long-term factors, I will once again consider whether I define the project number as a global attribute and maintain it manually per document.

Top Tags