Cancel
Showing results for 
Search instead for 
Did you mean: 

Naming rule based on an object attribute value

Creator
Creator

Hi,

I would like to create a naming rule with different patterns depending on object attribute value.

The naming rule pattern would be determined at creation when the user select the attribute value (i.e. SubType) from a LOV.

ex.

If SubType="context" then object ID => "CON-"NNNNNNNNN

If SubType=any other value then object ID => "DES-"NNNNNNNNN

 

Thanks for your help

 

2 REPLIES

Re: Naming rule based on an object attribute value

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
I would likely apply the default naming rule to Item (or a hidden sub-Item that the others are based on) then override using the custom naming rule specifically for ContextItem to achieve your result. Leveraging inheritance.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Naming rule based on an object attribute value

Creator
Creator

Hello Randy,

 

Leveraging inheritance would be the best option in a perfect world, but I do not have the luxury of implementing subTyped item to apply them different naming rules at this stage of the project Smiley Sad At this point I only have an "Sub Type" attribute.

 

I was thinking of using intelligent part numbering by attaching an ID generation rule to the item_id property of the object.

But I'm not not sure how to set the condition to generate the ID based on the attribute value.