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

For Rename function, allow "Same as Name" system preference for Filename

For Rename function, allow "Same as Name" system preference for Filename

The Save As function has a Filename -> "Same as Name" system preference that will set Filename to the value of Name.  This is very useful if you want to keep these fields the same.  The Rename function should have the same system preference.

8 Comments
STEVEG
21-Topaz I

This would be very helpful.  I created a report I run every so often to report all the CAD files where the Number doesn't match the File Name.

rheinz
8-Gravel

Can confirm that this would make life more easier - don't understand why ist really different to SAVE as where it is available and why no more telling PTC that it is needed

jzimmermann-2
3-Visitor

Very usefull. Should be implemented yesterday!

cmayer-3
1-Newbie

This is a necesary funcionality: Cause often you have to be sure to keep the two fields filename and name the same. Whereas number is only a simple sequence of numbers.

But to be exact: for EPMDocument - Filename have to be unique! 
Whereas Name (=PTC_COMMON_NAME) may be often the same in database (is like short description for this object - this is an intention of PTC in Creo).
So the best way is to have: NAME -> 'Same as Filename'   in both  'Save As'  and  'Rename' function.

Thanks a lot.

lhughes
6-Contributor

Have had many requests for this, though they would like number same as file name.

File name and number, as you have pointed out, need to be unique in the system. Interesting as this is only for EPMDocuments and not WTDocs, they use a generated UID for them. EPMDoc could be updated in the same manner technically, but I would still enforce the unique file name, yet allow number to occur once for each file type. This could enable quick linking when you have a drawing, assembly/model, and WT Part with the same number for linking/searching purposes.

cmilligan
3-Visitor

I have a hard time understanding why people want duplicate attributes in their system. If Number and Filename match, why have Number at all (other than it is required)? If you don't put the extension in the Number, then the CAD drawing and CAD part must have different numbers and at least one cannot match the drawing number. Then you have this orphaned meaningless Number (or you use another sequence entirely and both are meaningless). In both cases the Number is not useful because it either doesn't match the drawing number, or it is duplicate to the Filename.

A similar argument for the Name if it is made to match something else (Filename or Number). However the Name does not need to be unique, so I can place the same number in it for both the CAD drawing and CAD part. The Name isn't really designed to be a number though, it is supposed to be a title, a short description of what the thing is. A lot of people use it for the drawing number though, because the numbering in this system is so messed up. Taking the uniqueness constraint off the Number would probably help clean some of this up. That would allow the Number to match the drawing number on both records, and the Name could be used for its intended purpose.

The root of the whole issue though stems from having multiple records for the same drawing number. WC creates two records, CAD part and CAD drawing instead of a single record with multiple content. If they were a single record, then you have a single unique Number that matches the drawing number, the Name can be used for its intended purpose, and the filename is the drawing number + extension maintaining uniqueness (except for cases of multiple sheets in multiple files, where the sheet number would likely need to be appended). I would guess then, the requirement for this request would go away.

Back to the specific request though. It states in the description of this discussion that the Filename should be the same as the Name, but don't you really want the filename to be Name+Extension? So they don't really match. The SaveAs appends the extension automatically though, so it is implied the Rename would as well. Programmers tend to take thing literally though, so if you want the extension appended I would state it.

fschubert
3-Visitor

Here's a simple customization, from one of my very capable colleagues, that may help you. It is easy to implement:

 

  1. Backup the file '/codebase/templates/htmlcomp/setidentity/identityComponent.js'
  2. Edit 'identityComponent.js' and complete the following code (as shown below) starting around line 5:
  3. Delete the browser cache and enjoy it
  4. Important: Copy Customizing to the 'WTSaveArea' for further updates

 

function initializeRulePicker() {
    var rulePickerConfigurator = top.opener.getRulePickerConfigurator();
 
    // Name configuration intialization
    intializeSetNewNameUI(rulePickerConfigurator.nameRuleConfigurator);
    // Number configuration intialization
    intializeSetNewNameUI(rulePickerConfigurator.numberRuleConfigurator);
    // File Name configuration intialization
    intializeSetNewNameUI(rulePickerConfigurator.fileNameRuleConfigurator);
    
    //Initialize contents
    initializeSetNewNameUIContents();
 
    var radioElement = document.getElementById("FileName_Same_As_Number");
    if(radioElement != null){
      radioElement.checked = true;
      PTC.event.fireEvent(radioElement, "click");
    }
      var radioElement = document.getElementById("Name_Same_As_Number");
    if(radioElement != null){
      radioElement.checked = true;
      PTC.event.fireEvent(radioElement, "click");
    } 
}
ebaldoni
1-Newbie

Hi everybody,

i try this solution ad it works fine only for rename funcition.

Has anyone found a solution for the "save as" function? I tihink it's very important.

Thanks