Skip to main content
21-Topaz I
October 14, 2015
Solved

Rename the File Name of a document

  • October 14, 2015
  • 4 replies
  • 7887 views

Can you rename the File Name of a document in PDMLink like you can for CAD files?  Not through accessing the database.  I want it through the UI of PDMLink.

Best answer by kpritchard

So for a limited number of Documents why not Delete non-latest Iterations to get rid of your A.1?  This would get rid of the "fingerprints" of the bad file name.

4 replies

1-Visitor
October 14, 2015

Why not download the file, rename it locally and replace content?  Is it a permissions thing?  How many need to be renamed?  Are you trying to avoid iterations?

In theory, a custom action could be created to do the above (since the filename property does not seem to have a set Method) and add to the UI

STEVEG21-Topaz IAuthor
21-Topaz I
October 16, 2015

Then the history of the File Name is not correct.

There are not that many and so far we have resorted to exporting the file, deleting it from PDMLink, then the user re-imports it as the correct File Name.

I don't want results from a search to show a file when the File Name was once what they entered to be searched for.  If that makes sense.

1-Visitor
October 19, 2015

Do you mean the "Name" of the WTDocument Object or the filename?  I was assuming filename...  Or are you deleting to get rid of the "fingerprints" of the erroneous filename in older WTDocuments?  Purge and/or Delete non-latest iterations should be able to take care of that and save you deleting and recreating the WTDocument.

... In other news, I was able to set the filename of a secondary content (attachment) as part of doing an automated upload of an attachment, so I would expect that developing a small utility to find and adjust the filename would be doable... just not sure of the results so test, test test.  The use case I was working on was to capture the text in the "Proposed Solution" Attribute of a Change Request and upload as an attachment to capture the initial value so the attribute could evolve as the Change Request progresses.

STEVEG21-Topaz IAuthor
21-Topaz I
October 21, 2015

I am talking about the "File Name".  I.e.

The history of the document will look like this.

File Name                 Version

123456.docx               A.1

789123.docx               A.2

The "Name" and "Number" fields can be changed but you can't use the Rename command in PDMLink.

22-Sapphire I
October 21, 2015

It's interested to take a step back and consider this.

In general, a business doesn't care if a Document is CAD or non-CAD but Windchill has to - and has to force users to work in very different ways for CAD Docs vs. WT Docs.  Why?  Fundamentally because the CAD files "know" what other filenames they are dependent on - but non-CAD doc's don't have this relationship (except in the case of OLE object relationships in MS Word, Excel, etc. but these are not accommodated by Windchill).

he CAD file relationships are created by the CAD tool (e.g. a DRW references a PRT; an ASM references a PRT).  Windchill needs to essentially duplicate these relationships as the links between CAD Documents, adding more functionality such as As-Stored and Occurrences, links to viewables, etc.

If one changes a CAD filename without telling Windchill about it by changing the CAD Doc Number, then the CAD relationship will fail.  One can easily see this by using File, Backup from CAD and then changing filenames on disk directly (outside Windchill).

For WTDoc's that are Renamed / renumbered, it seems to make sense that the files remains in place for each History version; can't be accommodated for CAD though.

17-Peridot
November 7, 2017

Was a Product Idea ever submitted for this topic? I could not find one, but it should be there.