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

We are happy to announce the new Windchill Customization board! Learn more.

Rename with Autonumber - Have Drawing Match Model

TomU
23-Emerald IV

Rename with Autonumber - Have Drawing Match Model

I have just enabled autonumbering for one particular product and now I need to do some renaming/renumbering to use the new numbers.  Is there any way to have the drawings automatically use the model's newly assigned number?  Since I can't see what the new number is until after the renaming process is finished, I have no idea how to properly rename the drawings while still keeping them matched up with their corresponding models.  Any ideas?

 

This is what happens if I autonumber everything together (drawing doesn't match the model):

 

BeforeBefore      DuringDuring   AfterAfter

If I autonumber just the models, I won't have any idea which newly named model the drawing should be associated with (in order to rename it.):

 

   BeforeBefore   DuringDuring   AfterAfter

19 REPLIES 19
BineshKumar1
12-Amethyst
(To:TomU)

Thanks  for this topic, Tom. This is a pain which we have been going through ever since we have enabled autonumbering. The only workaround we have found is by enabling the config.pro option, rename_drawings_with_objects  and then do a save as from Creo. Of course a save as from Creo has its own limitations. 

We are very interested to know how others do this. 

TomU
23-Emerald IV
(To:BineshKumar1)

Unfortunately I need to rename thousands of objects, and most of them are in SolidWorks.  Smiley Sad

 

What I really need is something like this for each of the drawings:

autogenerate.png

 

We don't use WT Parts, but I wonder if "Generate document number based on related Part" could do this...

Would it work to somehow (automatically) associate both the model and the drawing to the same WT Part, rename the WT Part (autonumber), and then rename the CAD model and drawing to follow the WT Part?

JenniferPierron
14-Alexandrite
(To:TomU)

Hello Tom.

 

Are you also creating Parts in Windchill?  Does your Part have the same number?

Are you using Windchill 11.0?

 

In Windchill 11.0, in the Rename UI, there is an option "Generate document number based on related Part".

Rename_SetNew_names.gif

 

The control was designed such that the model and the drawing (and other deliverables related to the Part) use the Part's number as a basis for the CAD Document numbers:

Part's Identifiers:

  • Number is generated: 00001234

CAD Document's Identifiers

 - Number is based on Part number; but contains extensions and suffixes to make it unique

  • 00001234.PRT
  • 00001234_FLEX001.PRT
  • 00001234.DRW
  • 00001234.MFG

–File Name is same as number

 

 

Does this help?

Thanks

Jennifer

 

TomU
23-Emerald IV
(To:JenniferPierron)

@JenniferPierron,

Thanks for the reply.  Yes, Windchill 11.0 M030 CPS01.  We are not currently using WT Parts.  So far we haven't seen any benefit to doing so.  (We are CAD centric, don't use BOMs, and aren't connected to an ERP system.)  I'm not sure I want to start using WT Parts just for the rename capability.  Seems like an awful lot of overhead and extra work just for this function.

 

I also recently noticed that there is an inconsistency with the "Set New Name" dialog depending on whether I'm doing a "Rename" or "Save As".  "Rename" will allow me to set everything to an autogenerated number.  "Save As" will not.  Why? Smiley Frustrated 

Set New Name.png

 

Unfortunately, neither "Rename" or "Save As" will allow the drawing and cad model name/number/filename to stay synchronized between them.  (The drawing and model already match,except for extension, and they should continue to match after both a rename and save as.)

JenniferPierron
14-Alexandrite
(To:TomU)

Hello Tom.

 

I understand.  Each company must decide whether to use Parts or not.

 

You asked:

Rename" will allow me to set everything to an autogenerated number.  "Save As" will not.  Why? Smiley Frustrated 

<jlmp> So, there is a way to do it; but you are right it is not done in the same way.

<jlmp>

<jlmp>HOW TO SET NAME=NUMBER in SAVE AS UI

<jlmp>- You need to set up an OIR that sets name=number, then choose the "Autogenerate" choice.   If you need a sample OIR let me know.

<jlmp>

<jlmp>WHY ARE THEY DIFFERENT?

<jlmp>Save As is really CREATING and thus OIRs are applicable.  Based on requestes, we have extended OIR concepts to rename; but originally they were not designed to use OIRs.   The result is that the options are slightly different where Save As is more OIR focused and Rename controls are more explicit.

 

<jlmp>You stated:

Unfortunately, neither "Rename" or "Save As" will allow the drawing and cad model name/number/filename to stay synchronized between them. 

<jlmp> If you do not have a Part, we do not have a tool right now.

<jlmp> The only other suggestion I have is to use the OIRs to generate number; but allow it to be editable (not immutable).  If you do not want to pre-generate the number, then you will need to do the rename in 2 steps.

<jlmp> If you would like some additional tools, I would start an idea and based on interest, we could add something to the software.

 

Thanks

Jennifer

 

 

TomU
23-Emerald IV
(To:JenniferPierron)

Thanks again for the reply.  I'm actually less worried about Name and more worried about Filename during a save-as.  If we ever start using Name as a description (instead of just a duplicate of Number), it would actually need to remain unchanged.  Obviously that won't work for Filename since no duplicates are allowed.  Will the OIR that controls save-as allow Filename to automatically equal Number (and just leave Name unchanged)?  Thanks.

JenniferPierron
14-Alexandrite
(To:TomU)

Hello Tom.

 

I understand your concern. 

 

File Name cannot be controlled by an OIR.

 

I don't know why your control is disabled.    Are you selecting new files in WS where some do not have a number?

 

Otherwise, I always see Same As Number enabled and it can be the default option using the server-side preference:

Save As > Inherit FileName From Number to Yes (and locked if you want).

 

If you cannot isoloate why it is disabled, I would encourage you to file a Tech Support call, because your use case of setting Number to be autogenerated and file name to be the same was intended to be supported.

 

Thanks

Jennifer

TomU
23-Emerald IV
(To:JenniferPierron)


I don't know why your control is disabled.    Are you selecting new files in WS where some do not have a number?


These are new files in the workspace, but they've been uploaded and they do have a number assigned.  (Remember, autonumber is enabled on this system and save-as isn't allowed until after upload.)

 

I just did a quick test.  The dialog is the same regardless of whether the files are new (and uploaded) or checked in, and regardless of whether I use the embedded browser or use a stand-alone browser to access the workspace.  Calling the save-as from the commonspace object's details page also looks the same.  Maybe you should send me the sample OIR...  Thanks.

TomU
23-Emerald IV
(To:JenniferPierron)

I just tried changing the "Save As" preferences.  Lots of pictures below but to summarize, the preferences do allow FileName to match Number but they don't do anything for Name.  The "Save As" dialog does not allow Name to be the same as Number.  (Rename has this ability, Save As does not.)

 

Both preferences set to "No"

Commonspace Save As - 01.png

Commonspace Save As - 02.png

Commonspace Save As - 03.png

 

Inherit FileName from Number set to "Yes"

Commonspace Save As - 04.png

Commonspace Save As - 05.png

Commonspace Save As - 06.png

 

Inherit FileName from Name set to "Yes"

Commonspace Save As - 07.png

Commonspace Save As - 08.png

Commonspace Save As - 09.png

 

JenniferPierron
14-Alexandrite
(To:TomU)

Hi Tom.

 

So the preferences are working as expected, right?   Your images of the preference settings contradict you headers.

 

Also, for the question:

the preferences do allow FileName to match Number but they don't do anything for Name.  The "Save As" dialog does not allow Name to be the same as Number. 

 

Right.  You need to set up an OIR such that Name is generated to be the same as number.  Then when the user goes into Save As, s/he will see the value for Name be "Autogenerated" by default.   The OIRs will then generate the name to be the same as the number. (same thing just a different way of doing it).

 

For example I added the following to the out of the box OIR for CAD Document:

<!-- set the name to File Name -->

<AttrValue id="name" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<Attr id="number"/>

</AttrValue>

 

<AttrConstraint id="name" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</AttrConstraint>

</AttributeValues>

 

Lastly, I was thinking about your concern of "wasting" numbers;

I wanted to try, but haven't had time yet, to write an OIR to only provide a generated number using the number generation algorithm for CAD Documents of category CAD Part or Assembly.   For other categories, I would set the generated number to equal the file name.  Theoretically, this should work and you would not "waste" numbers for deliverables like drawings, manufacturing models, etc.   If you have a chance to try, I am sure others would like to hear your results.

 

Thanks

Jennifer

TomU
23-Emerald IV
(To:JenniferPierron)


@JenniferPierron wrote:

Your images of the preference settings contradict you headers.


Good catch.  I just fixed them.

 

I had just finished creating and testing a new rule in the OIR before I saw your reply.  Here is what I added and the resulting behavior:

Commonspace Save As - 10.png

Commonspace Save As - 11.PNG

Commonspace Save As - 12.png

Commonspace Save As - 13.png

 

Adding this OIR does keep Name set equal to Number, so this is good.  Smiley Happy  I guess the only disappointing thing with this approach is that it's not obvious to the end user that this is actually what is happening.  It would be great if "<Same As Number>" could appear for the "New Name" field just like it does for the "New File Name" field.  This would be especially helpful when Number is manually set to something else.  There is nothing to indicate that Name will actually follow number vs. some (other) server generated value.

 

Commonspace Save As - 14.png

 


@JenniferPierron wrote:

 

Lastly, I was thinking about your concern of "wasting" numbers;

I wanted to try, but haven't had time yet, to write an OIR to only provide a generated number using the number generation algorithm for CAD Documents of category CAD Part or Assembly.   For other categories, I would set the generated number to equal the file name.  Theoretically, this should work and you would not "waste" numbers for deliverables like drawings, manufacturing models, etc.   If you have a chance to try, I am sure others would like to hear your results.

 


I don't think this will work due to how Creo seems to be currently integrated with Windchill.  It might be better to have this discussion over here, but the problem seems to be with Creo itself, not necessarily Windchill, autonumbering, or the OIR.  The root issue is that a number is pulled instantly as soon as these different actions in Creo are started (with the exception of File/New).  For each save as action from Creo, a number is wasted before the file type is even selected.  Since this is happening within Creo itself, everything it generates would be a CAD document anyway (subtype of EPM Document.)  I think the only solution is to either prevent Creo from using autonumbers (while still keeping them enabled in Windchill) or change Creo so it behaves the consistently everywhere. Every place a filename is displayed it should just display "<auto generated name>" and not actually pull the next number until the action is completed.  This is how it works for File/New, but everywhere else it consumes a number and displays the generated value instead.

 

Hi,

    when I do a 'Save As' . The part and drawing generate different numbers which is weird. They are supposed to be same.

CAD users spend a lot of time to create a 'Save As' object. They have to save as drawing/part and rename to match the related drawing/part. Lot of time spent on this instead of productive work. Also the users are adapting to Windchill from a legacy PDM system. So this needs to be addressed ASAP!

 

Is there a preference setting to overcome this issue. Help me with this issue. Thanks!

 

Windchill: Release: 11.0 M030-CPS04

 

 

TomU
23-Emerald IV
(To:rajeshkumar10)

There is nothing in Windchill that will cause a drawing and it's related model to continue to use matching names, numbers, or filenames during a save-as or rename operation.  That's the point of this discussion and the product manager (Jennifer) makes it clear that nothing currently exists to do this:  "...we do not have a tool right now."

JHall
16-Pearl
(To:TomU)

@JenniferPierron 
I wonder if there is a way to use customization of some sort to accomplish Save As producing either editable numbers or all following the WTPart?  This is a current requirement for my company.

 

James 
Windchill 11.0 M030 CPS08
WGM 11.0 M030 CPS13
Inventor Pro 2018

You can try to catch the save as event and then rename the drawing to match the part or model number. This is not that easy. First of all you need to turn of the number generator for drawing since the drawing will get a number first. Afterwards you need to get to the attached model. This will already be a problem, since Creo doesn't pass the active part to Windchill. So if the drawing has two parts in it, you will also get to parts in Windchill. Which one is now the correct one? If you always do the save as together, you will find out.

Then you also need to consider that sometimes multiple drawings can be created. What about production, customer etc. drawings? So you probably need to extend the number with _1.DRW _2.DRW etc. 

 

I did some customizings in this area, but I always had some problems and workarounds in it... 

If you ever get this to run, you are very welcome to share your thoughts.

TomU
23-Emerald IV
(To:BineshKumar1)

@BineshKumar1, I've had to turn autonumber back off for the time being.  It was super nice when it worked, but the fact that it wasted a number every time someone did a save-as, rename, or replace from Creo made it completely unusable.  Especially on save-as.  A number was wasted every time someone ran a mapkey to generate a PDF, DXF, IGES, STEP, etc. Smiley Frustrated  You can read my full post about it here: https://community.ptc.com/t5/Windchill-Questions/Autonumbering-and-Creo/m-p/478337.

I do have a couple of cases open with PTC but so far they haven't gone anywhere.  Smiley Sad

BineshKumar1
12-Amethyst
(To:TomU)

Hi @TomU,

 

We do have the same issue, the system wastes a new number for save as to other formats, when we rename drawings to match the model number and so on. This wastage of numbers hasn't been escalated to a concern, but I am sure some day it will. It would be nice, if we can turn on autonumber only when you create a new CAD document from Windchill, and an option to control the behaviour in save as and rename wizards. Do we have a product idea on this? I couldn't find one

TomU
23-Emerald IV
(To:BineshKumar1)

@BineshKumar1,

There is a product idea for the Save-As portion.  I added a comment requesting it also apply to rename and replace.

https://community.ptc.com/t5/Windchill-Ideas/Can-Save-As-dialog-from-Pro-E-Creo-show-lt-auto-generated-number/idc-p/479065

BjoernRueegg
17-Peridot
(To:TomU)

I think we finally should stop to discuss that the WTPart, the CAD Model and CAD Drawing should get the same number! We are in the 20th century and we are still discussing a solution for numbering??? Why? This is only since PTC Creo is not as flexible as it should be! PTC Creo should finally start working as part of the PDM system rather as standalone CAD-Application where the filename is "the wolrd". 

Extend Creo with the function to have the "filename" shown from different attribute values. This function is available in Creo View but not in Creo.

In my concept there is just one numbering and this starts with 1 and ends with 9999...... Smiley Tongue

Everybody knows that autonumbering is the solution, but we can't using it, while even the CAD Software from the same house isn't ready. This is just sad.

We have so many days of discussion with customers and at the end we end up always with workarounds...  PTC please! provide finally a solution that works in 99% of the cases so the customer can concentrate on topics like IoT or digital twins...

 

Top Tags