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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

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

LB_10619520
6-Contributor

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.

7 REPLIES 7
RPN
17-Peridot
17-Peridot
(To:LB_10619520)

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.
*/

LB_10619520
6-Contributor
(To:RPN)

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.

RPN
17-Peridot
17-Peridot
(To:LB_10619520)

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. 

LB_10619520
6-Contributor
(To:RPN)

Hello @RPN 

 

Thanks once again for your replay but I am still unable to get understand solution you provided.

I wanted to add few more points in information as below.

OIR screenshot :

LB_10619520_1-1735195995956.png

 

1. When CAD objects are created via WGM/WEB browser workspace or "New CAD Document" button in Creo,

I am able to get the same numbering as per OIR even if I use <Attr id="docType"/> :

Workspace screenshot :

LB_10619520_4-1735196579056.png

 

2. When I create CAD object using "File >> New" in Creo, I am unable to get respective OIR logic f I use doc: <Attr id="docType"/> .

New button window in Creo

LB_10619520_5-1735196674962.png

Since, I am working on other requirements which are depends on this business requirement to implement as it is. so its crucial to get this functionally.

3. PTC says : Not part of Windchill PDMLink functionality ( Article : https://www.ptc.com/en/support/article/CS188317 ).

As per article PTC has given three options.

  • -Either- Use New CAD Document UI from CATIA session, to have same functionality as in Workspace. --> This impacts my other requirements.
  • -OR- use separate soft-type for each document category, with separate OIRs respectively --> Can't use since whole business process will affected.
  • -OR- Try the customization described in article CS172880 to generate a new Number during initial upload, (if that works together with other custom workflows) --> This mentions  "EPMDocumentNamingDelegate" which triggers on Update of CAD object from Creo to WP. which we don't want as user will be confuse with different numbers, also only Name & Number gets updated and filename remains old ( which is not expected).

4. If you could help me detailed information about your solution. I will follow the steps to get it implemented.

1. Which system to implement in >> Windchill/Creo ?

2. Which files are needs to update ?

3. What is location if those files ?

4. Another details to keep in mind, 

 

Looking forward to you repsonce.

 

Thanks in advance.

RPN
17-Peridot
17-Peridot
(To:LB_10619520)

Sorry but you wrote:

„I wanted to enable same numbering logic„ 

 

Now you write, you want to add more points.  Anyhow, in Windchill you define your logic, next use the given Toolkit Call to get the next number in Creo you can also use Pre/Post Notification Functions on „Create“ to make your own logic available, even with a separate GUI. In detail this may more complex, because you have to deal with different scenarios in Creo. 

The OIR can’t be defined in Creo, wouldn’t make sense in my opinion. For testing I would use a OIR within a Product or even a Folder. Just prepare it in Windchill and call ProMdlObjectdefaultnameGet() in Creo. 

 

 

Hi @LB_10619520,

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.

Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Catalina
PTC Community Moderator
RPN
17-Peridot
17-Peridot
(To:LB_10619520)

In Creo and with Creo templates (even from a file folder) it should work as I have mentioned, because the extension (prt, asm or drw) drives the type. For CATIA I have no clue if you have different extensions. As far I know you could provide a parameter in your model file, which describes the type like

 

my_caddoc_type=com.ptc.DesignCADDrw

 

In this case you need to configure Windchill to link my_caddoc_type (probably a new soft type) in a preference, that Windchill knows which parameter to check for the CAD Document Type.
We had the same issue with NX. And I guess in this case the template must be taken from Windchill and the template in Windchill must contain the designated parameter. 

For NX there  are as well no different extensions, and a file can contain the model and the drawing of the model. 

Announcements


Top Tags