Skip to main content
10-Marble
Dec 20, 2024 12:26 PM UTC
Question

How to enable same numbering logic as Windchill OIR on File Name attribute in Creo

I wanted to enable same numbering logic as Windchill OIR on File Name attribute in Creo while creating new object in Creo.

 

With current configuration CAD Objects are creates e.g. PRT002.PRT as shown below  :

LB_10619520_0-1734696621958.png

LB_10619520_3-1734697224860.png

 

 

I already can create CAD object as per my define OIR as below :

LB_10619520_1-1734696966782.png

 

Please help me to get Windchill OIR configure to Creo to create CAD objects with same numbering scheme.

8 replies

RPN
18-Opal
Dec 20, 2024 12:45 PM UTC

Try this 

 

extern ProError ProMdlObjectdefaultnameGet (ProType object_type, ProLine name);
/*
Purpose: Returns the next available default name for given object type

Input Arguments:
object_type - only these types are allowed:
<ul>
<li>PRO_PART
<li>PRO_ASSEMBLY
<li>PRO_CABLE
<li>PRO_DRAWING
<li>PRO_REPORT
<li>PRO_2DSECTION
<li>PRO_3DSECTION
<li>PRO_LAYOUT
<li>PRO_DWGFORM
<li>PRO_MARKUP
</ul>

Output Arguments:
name - resulting name.

Return Values:
PRO_TK_NO_ERROR - The function successfully created the name.
PRO_TK_UNSUPPORTED - the type is not supported.
*/

Translate
WT_01021910-MarbleAuthor
10-Marble
Dec 22, 2024 7:29 AM UTC

HI @RPN , Thank you for your reply.

 

Could you please elaborate the solution in more detailed to get it implemented?.

I mean I didn't understand the syntax as well as where do I make these changes ? 

 

Thanks in advance.

Translate
RPN
18-Opal
Dec 22, 2024 10:27 AM UTC

Just give the type, the returned string is the same what you would get in Creo by your OIR. Give it a try, it’s easy 😉. So you will not get PRT00?? for PRO_PART. Make sure you are connected to Windchill. Next the Org/Product/Folder will fire the OIR for the returned string value. 

Translate