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

WT Part Number to Match Cad Part Number

Highlighted
Gravel

WT Part Number to Match Cad Part Number

Hey, have a simple one I think. 

We create our part numbers in creo (Auto Generated).

Faster for designers and engineers to get things done. 

 

Then after the fact, we create the gear parts / WT parts. 

 

Slight problem. The Gear part is creating its own number that is different and independent of the cad part no.

How do I get them to auto-generate/associate without manually entering every gear part number?

 

 

Cheers

RC

 

5 REPLIES 5

Re: WT Part Number to Match Cad Part Number

Have you tried the Windchill 'Auto Associate Option Upon Check In' Option? If that works, your Windchill admin can set this as the default for all users.

Check In Auto Associate.jpgCheck In Auto Associate WC Preference.jpg

Re: WT Part Number to Match Cad Part Number

yes, I have and the part numbers do not match. That's what I am trying to fix. The Part dose associate to the Gear Part but I want the Gear Part and Part number to match. This is what happens when I do that. 

 

 

Re: WT Part Number to Match Cad Part Number

Looks like I may need to update my Object Initialization Rule. 

Anyone have info to help on how to do this to set the number to the part number. 

 

 

 <!-- set the number to a generated number -->
               <AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"> 
                  <!-- 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 -->
                  <Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>
               </AttrValue>
               
               <!-- set the version info to a generated version info -->
               <AttrValue id="MBA|versionInfo" algorithm="com.ptc.core.foundation.vc.server.impl.VersionInfoGenerator">
                  <Arg>wt.series.HarvardSeries</Arg>
               </AttrValue>
               
               <!-- name of variant parts -->
               <AttrValue id="name" algorithm="wt.rule.algorithm.BooleanBranch">
                  <Value algorithm="wt.rule.algorithm.EqualsTest">
                     <Attr id="genericType"/>
                     <Arg>variant</Arg> 
                  </Value>
                  <!-- assign a name only for variant parts. for others return null. 
                       name should be assigned by the client -->
                  <Value algorithm="wt.generic.rule.VariantNameGenerator">
                     <Arg>{GEN:wt.enterprise.SequenceGenerator:variantnameseq:10:0}</Arg>
                  </Value>
                  <Value algorithm="wt.rule.algorithm.StringConstant">
                     <Arg/>
                  </Value>
               </AttrValue>
               <AttrValue id="organization.id" algorithm="com.ptc.windchill.enterprise.org.server.impl.OwningOrgDefaultAlgorithm"> 
               </AttrValue>
			   

 

Re: WT Part Number to Match Cad Part Number

I attached is the OIR that we have on our Windchill Test Server for WTParts. As far as I know these OIR's are out of the box. I didn't see anything different with what you shared.CAD and Parts with Same Name OIR.jpg

Re: WT Part Number to Match Cad Part Number

I attached my rule file. 

Def, not a match, and it won't let me try and push yours on top as a test.

I get XML specification for the part init rule is either not well-formed or invalid. 

 

I can copy for code down to attached file rule(4) before I get an error. 

I think this is my issue but I don't know how to get rid of it. 

 

<AttrConstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">  VS  Value algorithm="wt.rule.algorithm.BooleanBranch"> 
<!-- Add handling for ProjectLink and PdmLink differently OOTB for wt.part.WTPart object number field
	                For end items in PDMLink context, turn the autonumbering off -->
                   <AttrConstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">        
                       <Value algorithm="com.ptc.core.rule.server.impl.IfContainerTypeEqualsProjectTest"/>       
                          <Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
                              <Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>                              
                          </Value>        
                       <AttrConstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">  
                           <Value algorithm="wt.rule.algorithm.StringEqualsTest">
                              <Attr id="endItem"/>
                              <Arg>true</Arg> 
                           </Value>
                           
                           <Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"/>
                           
                           <Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
                               <Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/> 
                               <Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>        
                           </Value>        
                       </AttrConstraint>        
                   </AttrConstraint>