Skip to main content
12-Amethyst
January 23, 2015
Question

Auto - Numbering Scheme: how to reset to a given number

  • January 23, 2015
  • 1 reply
  • 4403 views

Hello,

anyone knows how to reset the autonumbering of CAD documents in Windchill 10.2 to a given number?

For example, I have to reset the autonumbering ,instead from 150001, from 150014....How can I do it starting from these strings I have in the xml file of EPM document voice (Object initialization Rules)? :

-<AttrValue final="false" force="false" ignore="false" algorithm="com.ptc.smb.helper.SMBNumberGenerator" id="number"><Arg>15</Arg><Arg>{GEN:wt.enterprise.SequenceGenerator:EPM_seq:4:0}</Arg>

many thanks

1 reply

15-Moonstone
January 23, 2015

Tommaso,

Are you saying that you want the sequence EPM_seq to start at 14 instead of 1?

tleati12-AmethystAuthor
12-Amethyst
January 23, 2015

Hi Ben,

No I don't...I don't know what is EPM_seq (maybe the server sequence?), maybe I reported the wrong lines of the

xml file...

Our custom numbering scheme (quite simple) it's 6 digits beginnnig with 15 (year 2015), so the first number is 150001.

Since we "burned" some codes (from 150014 to 150022, because we wrongly created some CAD documents and then deleted them), now the sequence for new objects restarts from 150023....I would like to re-set the numbering to 150014...

thanks

Tommaso

15-Moonstone
January 23, 2015

The sequence resides in the database. You need to modify the sequence by executing some code against it. A DBA will be able to do this if you cannot.

I always get a little confused with math and sequences, so hopefully my math is right. If not, you can modify the code a little to get the right number.

Assuming you're using an Oracle database for your Windchill installation:

ALTER SEQUENCE EPM_seq INCREMENT BY -8;

SELECT EPM_seq.NEXTVAL FROM dual;

ALTER SEQUENCE EPM_seq INCREMENT BY 1 NOCACHE;

For more reference: CS36346 or google "alter sequence"