Skip to main content
14-Alexandrite
September 19, 2025
Solved

See the autogenerated number

  • September 19, 2025
  • 2 replies
  • 710 views

Version: Windchill 12.1

 

Use Case: See the generated number


Description:

Hi,

 

My request is to set autonumbering for objects while giving the user the ability to modify, for that I'm following this article How to Turn on Autonumbering for CAD document but also allow override the number during Save As or Rename in Windchill PDMLink.

 

This is working and Windchill shows the label Generated, my question is it possible to let the user sees this number (during creation)?

Because the user can modify the number, it's worth letting him see the one generated to decide whether to modify it or not.

 

tarikwifakp_0-1758323100580.png

 

Thanks in advance,

 

#autonumbering #autonumber #numbering #numbering_schemes 

Best answer by Fadel

Si Traik,

 

 

Set OIR as below 

 

Fadel_0-1758526631236.png

 

<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
	 	 	 <Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>
	 	 
</AttrConstraint>	 

 

2 replies

Fadel
Fadel23-Emerald IAnswer
23-Emerald I
September 22, 2025

Si Traik,

 

 

Set OIR as below 

 

Fadel_0-1758526631236.png

 

<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
	 	 	 <Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>
	 	 
</AttrConstraint>	 

 

Buiꓘa
tarik_p14-AlexandriteAuthor
14-Alexandrite
September 22, 2025

@Fadel It's working and the same number showing is the one taking after creation.

 

Thanks Mr. Windchill 🫡 !

avillanueva
23-Emerald I
23-Emerald I
September 22, 2025

@Fadel appears to have a good solution. Give it a try. If you want to see the number it would have generated and you are using an Oracle sequence, I believe just seeing the number will burn that number. The next request will generate a new number in  sequence. Correct me if I am wrong but validate that is ok with you.

tarik_p14-AlexandriteAuthor
14-Alexandrite
September 22, 2025

@avillanueva the customer is using SQL Server

23-Emerald IV
September 22, 2025

Same with SQL Server.  Once the number is displayed, it's already been 'used' up, even if the current screen is cancelled.  Windchill requested the number and the database supplied it, regardless of Windchill decides to do (or not do) with it.