Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. 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.
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 :
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 :
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
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.
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.
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,
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.