----- Forwarded by Lawrence Jett/LincolnFP/BerisfordPlc on 07/17/2006 03:18 PM -----
"Kmiec, Rand" <rkmiec@ptc.com>

05/25/2006 10:06 AM

To
<ljett@lincolnfp.com>
cc
Subject
Call 5218036 - Autonumbering questions





Lawrence,
  This email is in regard to call 5218036, about your autonumbering questions.  As I had mentioned yesterday on the phone, the primary information on this is contained in the 8.0 System Administrator's Guide (http://www.ptc.com/WCMS/files/29927/en/29927en_file1.pdf), page 254; this described how to create a custom numbering delegate for EPMDocuments (CAD docs).  There is also information online at the following URL:
 
https://pds.ptc.com/Windchill/wt/helpfiles/help_en/online/objrules/objrules.html
(if you have your own Windchill system running, you could access it there as well, with a similar path but a different hostname and/or webapp name)
 
  This will help you to understand the numbering schemes as well as the versioning schemes that can be can be applied to Parts, Documents, EPMDocuments, etc., and has a number of examples; it also discusses autonumbering and how to enable/disable it.  Finally, make sure you understand the concepts about containers (mostly that should be in the Business Administrator's Guide, I believe, though I think some of it is also in the System Administrator's guide.
  Regarding whether it's possible to have different numbering schemes, I believe it should be possible, although I don't have any example code for you.  wt.epm.EPMDocument.getDocType() is a method that will return the EPMDocumentType [enumerated type class] of an EPMDocument, so I believe if you customize the EPMDocument naming delegate as described above, that should allow you to query the type of the document and use an appropriate sequence.  I'm not positive that you can get an EPMDocument from the DocIdentifier that you have to work with until the upload is complete, though... but even if you can't, you could still look at the extension (.PRT,.ASM,etc.) and make the determination from that.  You'd probably have to create multiple Oracle sequences as well, for example, something like:
 
CREATE SEQUENCE epm_assy_seq
   MINVALUE 1000000000
   MAXVALUE 1999999999
   START WITH 1000000000
   INCREMENT BY 1;

 
CREATE SEQUENCE epm_part_seq
   MINVALUE 2000000000
   MAXVALUE 2999999999
   START WITH 2000000000
   INCREMENT BY 1;

 
  and then use those sequences in the delegate; I believe you'll also need to create a class to represent these in 8.0, since the PersistenceHelper.manager.getNextSequence(String) method is deprecated in 8.0 (although as of M010 at least, it still works ok).  If you need specific help with this, after you've got Windchill set up and running, you should open a new customization call (or calls) for the issues you encounter while trying to implement it.  There is definitely no way to accomplish this using out-of-the-box functionality, though; it would need to be a customization.
  If you don't mind, I'd like to close this call now, since I think this is a pretty decent overview of the numbering system (in general, we try to keep it to one specific question per call, for easier tracking purposes), so additional questions about related (or unrelated) functionality should each be new calls.  Please let me know if this is ok with you.
 
Regards,
 
Rand
 
 
 Online Call Tracking: Call 5218036
Rand Kmiec
Technical Support Engineer

PTC
1-800-477-6435

http://www.ptc.com/support/support.htm