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

Windchill Autonumbering new parts

Highlighted
Regular Member

Windchill Autonumbering new parts

Hi,

 

I want to change the default object (part, asm) name on Creo to follow a certain rule. Based on Windchill documents, this is done via OIR admin. I've had a look at a lot of articles and dicussions in PTC community regarding Object Initialization Rule (OIR), and it all points to goto OIR admin, edit the .xml under type 'Part'.

 

Below is an extract from the .xml file. From what I understand, all I need to do is add a new line <Arg></Arg>  under id="number" with my new numbering format. This doesn't seem to be doing anything. When I create a new part, it still does the default PRT0001 and increments 1 for the next new parts. What am I missing here?

 

 

<AttributeValues objType="wt.part.WTPart">

.......

<AttrValue
id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"
ignore="false"
force="false"
final="false">
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<Value algorithm="wt.rule.algorithm.EqualsTest">
<Attr id="genericType"/>
<Arg>variant</Arg>
</Value>
<Arg>V</Arg>
<Arg></Arg>
</Value>
<Arg>temp-</Arg>
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>
</AttrValue>
<AttrValue
id="folder.id"
algorithm="com.ptc.core.foundation.folder.server.impl.FolderPathAttributeAlgorithm"
ignore="false"
force="false"
final="false">
<Arg>/Default</Arg>
</AttrValue>

13 REPLIES 13
Highlighted

Re: Windchill Autonumbering new parts

Hi,

 

Are you wanting WTParts the be named temp-(number)? Or are you trying to get CAD parts to name in that manner?

 

Also you will need to look at where the rule is applied Org level or is it Product or library level and make sure the rule is enabled to override the higher level rule (that should be disabled in the product/library.

 

I should be able to help.

Re: Windchill Autonumbering new parts

Hi,

 

Thanks for the response.

I'm not certain about the difference between WTParts and CAD parts.

Currently, what I'm thinking of is CAD document (.drw, .prt, .asm) created from Creo (New, save as copy, replace with copy). We never use the 'Create New' option from Windchill, in case these two ways of creating objects have to be controlled using different rules.

 

As for the application of the rule, I want to test it by limiting its use within a Context of a Product or the entire Product level. If successful, I want to implement it to a bigger scale.

Highlighted

Re: Windchill Autonumbering new parts

Ok, so the OIR rule you have set is for WTParts not cad content.

 

That rule is the object type at the header would be objtype="wt.prt.EPMDocument" so what you have been trying is not applied to cad at all.

Highlighted

Re: Windchill Autonumbering new parts

I couldn't find one for wt.prt.EPMDocument.

This is what I found:

 

<AttributeValues objType="wt.epm.EPMDocument">
<AttrValue
id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"
ignore="false"
force="false"
final="false">
<Arg>temp</Arg>
<Arg>{GEN:wt.enterprise.SequenceGenerator:EPM_seq:10:0}</Arg>

</AttrValue>

 

I edited the type: EPM Document to include the new .xml. Still doesn't work. Is there a step after uploading the new .xml that I'm missing (i.e. register the changes)?

 

Regards

Highlighted

Re: Windchill Autonumbering new parts

If my thinking is correct, it is Friday after all, OIR only comes into play when creating objects (Parts, WTparts, documents, etc.) from within Windchill, not in Creo.

In order for you to get your desired results, you would need to create the CAD documents in Windchill as empty parts and then pull those parts into Creo to build the content. Typically CAD parts are not created this way. The designer opens Creo and does a File-New which has no rules for constructing a part number OOTB.

 

Highlighted

Re: Windchill Autonumbering new parts

OOTB the rules just do prt0001

 

if you configure Windchill to do it you will get customised autonumbering of CAD content in creo when working in the correct context workspace.

 

So I have products configured with product number as the first 4 characters and a hyphen splits that from the autonumber sequence generator and then I get new custom parts wherever I work.

 

I apply the OIR to each context and make sure that higher order OIR's are not enabled so it takes my context driven OIR.

 

Highlighted

Re: Windchill Autonumbering new parts

I've captured a screen of the context I want the OIR to work in. you will see one is site and is disabled and the other is the context (I've obscured name of the context) which is enabled. Your version of the file will go here. 

 

Also note that if you change the OIR rule it needs to be assigned again to that EPM Document OIR. 

 

Are you with me on this or do you need more help? Have you been loading in correct place and ensuring it is the enabled rule?

Highlighted

Re: Windchill Autonumbering new parts

"I apply the OIR to each context and make sure that higher order OIR's are not enabled so it takes my context driven OIR."

 

If you have to disable a higher OIR rule then Windchill is not working as designed. The documentation clearly states that OIR rules are applied from the Product/Library first, then Organization and finally Site. This builds a composite rule that can be tailored for all levels of your company and only change where you need the change.

 

If you only need to change the folder rule at the product level, that is all you need in that OIR and the rest of the OIR rules come from your organization or site level, The composite rule is what is applied to your document.

 

I have even run across PTC documentation that basically says this only works if you have the site level OIR enabled. BUT, I have seen other CS articles that say you must disable the higher level rules. So confusing when you have to enable this rule for it to work but disable another for that function to work.

 

Maybe PTC should do away with the composite rule building and if it finds a lower level OIR, just use it and ignore upper level ones. My customized OIRs are at the org level and they start as copies of the site level ones, so I have the full information in the OIR.

 

Highlighted

Re: Windchill Autonumbering new parts

The OIR gets applied at Upload.  Checkin includes Upload.

Announcements