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

How to set WTPartNumber by OIR when part is created from a CAD-item

Newbie

How to set WTPartNumber by OIR when part is created from a CAD-item

Hi everybody,

I´m using windchill 9.1 and Creo Parametrics 2.

When creating a new CAD-item (assembly or item) in creo I can enter

- name (EpmDocumentMaster.CADName/EpmDocumentMaster.Name)

- description (EpmDocument.NoteIterationInfo)

When cheking in, the auto-creation of a WTPart is enabled. So we get a WTPart with the

- same name (WTPartMaster.Name)

- same description (WTPart.NoteIterationInfo)

as entered.

The WTPartMaster.WTPartNumber is genereated by a counter-sequence. But I want it so be the same as the name (as entered). So I tried to change the OIR of WTPart, but when applying it, the machine can´t find the attribute "name"?! I´m not sure, if I completely understand the OIR. The rule applies to both tables WTPart and WTPartMaster?

Here is the OIR for WTPart and "number" (the older entries are wrapped with a comment):

<!-- set the number to a generated number -->

<!--OLD-ENTRY <AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"> -->

<AttrValue id="number">

<!-- add a V prefix for variant parts -->

<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>

<!-- the sequence -->

<!-- OLD-ENTRY<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>-->

<Attr id="name"/>

</AttrValue>

Any suggestions?

greetings Benjamin