Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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 :
I already can create CAD object as per my define OIR as below :
Please help me to get Windchill OIR configure to Creo to create CAD objects with same numbering scheme.
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.
*/
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.
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.