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

Rename with Autonumber - Have Drawing Match Model

Re: Rename with Autonumber - Have Drawing Match Model


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.

Re: Rename with Autonumber - Have Drawing Match Model

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

 

Re: Rename with Autonumber - Have Drawing Match Model

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

Re: Rename with Autonumber - Have Drawing Match Model


@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.

Re: Rename with Autonumber - Have Drawing Match Model

@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-generat...

Re: Rename with Autonumber - Have Drawing Match Model

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

 

Re: Rename with Autonumber - Have Drawing Match Model

 

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

 

 

Re: Rename with Autonumber - Have Drawing Match Model

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."

Re: Rename with Autonumber - Have Drawing Match Model

@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

Re: Rename with Autonumber - Have Drawing Match Model

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.