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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Windchill Cache Recovery Tool - Version 2.07 (WC_FileRecovery) - 64 bit version

RonThellen
14-Alexandrite

Windchill Cache Recovery Tool - Version 2.07 (WC_FileRecovery) - 64 bit version

Version 2.07 includes the following new features:

  • New file type is supported: USER_SYMBOL
  • Log file content now includes most information that was displayed in the WC_FileRecovery dialog prior to file recovery.
    The content is written in a tab-delimited format for easy import into Excel.
  • The “Type” dropdown in the File > Open dialog now includes a third option, “*.wfcont”, which displays both lid and sid files in the dialog

Ron Thellen

 

 

For those who have limitations in installing SW on their PCs, here is the version of the application I made portable.

 

https://community.ptc.com/t5/Windchill/Windchill-Cache-Recovery-Tool-Version-2-07-WC-FileRecovery-64/m-p/841558/highlight/true#M69249

 

Marco

15 REPLIES 15
Rupak
4-Participant
(To:RonThellen)

Hello Ron,

 

Is there a tool which support recovering Solidworks files from windchill cache?

 

Rupak

RonThellen
14-Alexandrite
(To:Rupak)

Currently the tool only supports recovery of Creo files.  I'm not aware of any other recovery tool.

 

Ron

jbailey
17-Peridot
(To:Rupak)

The SW WGM Cache works differently than the Creo WC Cache. It saves the file directly to a folder location, and overwrites the file on each save. The way around this is to set backup and recovery options in SW.

 

jbailey_0-1687355737768.png

 

RonanM
4-Participant
(To:RonThellen)

Thank you so much for your app, You've saved us hundred of hours of works !

We are not authorized to execute setup.exe or msi on our session, can you please provide the "WC_FileRecovery.exe" file ?

 

In the past I have had several times the need to make an application "portable" to bypass the same constraint you have on setup.exe and .msi files.

 

The best solution I have found is this SW, which does not require installation.

 

https://github.com/Bioruebe/UniExtract2

 

I attach the version made portable.

 

Simply open the .7z file and extract it to a folder and then run WC_FileRecovery.exe

 

Marco

Thanks for this!

I found recently that the utility doesn't like to install on newer computers. It wants to get an old version of .NET framework. Using this method allowed me to get around that. 

StephaneG
5-Regular Member
(To:RonThellen)

Hello Ron,
Hello Ron,
Thank you for this tool, really useful to assist my users.
Since few days, when I use it to recover mainly all sid_ files I have an error message that I never had before.
Sorry it's in french 🙂 It says invalidargument= the value "5" isn't valid for "index", parameter name = index
Could it be linked to Microsoft update, security strategy internally or just cache corruption ?

sgringras_0-1682581227463.png

Best regards

Stéphane

 

StephaneG
5-Regular Member
(To:Marco_Tosin)

Hello Marco,
Thanks, I tried but similar error message "the index is outside the bounds of the array"

sgringras_0-1682667206221.png

 

I wouldn't know what else to do to help you.

 

I just have one last question: in the error message I read that you have two options, close the program or continue the same ignoring the error.

 

Have you tried both options or only the first one?

 

 

Marco
StephaneG
5-Regular Member
(To:Marco_Tosin)

Hello Marco_Tosin,

I tried all:
- Installed version
- Portable version

- Continue or Leave

With continue anything recovered and for sure with leave, the application is closed

Thank you for your help even if at end the only solution I found, it's to open each sid file one by one to identify the extension and to rename each file manually.
For asm, drw and prt it works most of the time. Not for FT instance.
Best regards

The one problem I see with this tool is that if the users use a different common name on the file than the file name, then this tool is grabbing the common name to rename the files instead of the file name. I've been trying to script something that will do this properly but have had only partial success. 

 

Just using windows command this is what I've come up with so far for parts & assemblies. Drawings are a bigger problem. 

 

File headers contain the file type & the common name:

Our current script tool is keying off the common name in line 10.

However, this doesn’t work if the file has a unique common name as shown in this example

davehaigh_0-1686850432663.png

 

This file header shows an assembly that has not had the common name customized.

davehaigh_1-1686850432669.png

 

Command to find the files we want:

This command will give you a list of all the locally modified files in the Creo cache folder.

dir /b /s "lid_*.wfcont 

 

This command will print out the first line of each of the lib_ files in the cache

findstr #UGC: lid_*.wfcont

#UGC:2 PART 2000 1660 800 1 1 15 3900 2022124 000002cc \

#UGC:2 ASSEMBLY 2000 1660 800 1 1 15 3900 2022124 000002d0 \

 

Getting the file type:

If you just do a findstr a single file, and redirect it to a .txt file

findstr #UGC: lid_7242380155819393026.wfcont > test2.txt

 

This is output, which we ought to be able to use in the FOR command

davehaigh_2-1686850432670.png

 

Testing the FOR command on this text:

First start by testing the syntax you want to parse inside the ()

FOR /F "tokens=1-5 delims=: " %A IN ("#UGC:2 PART 2000 1660 800 1 1 15 3900 2022124 000002cc \") DO @echo %C

FOR /F "tokens=1-5 delims=: " %A IN ("#UGC:2 ASSEMBLY 2000 1660 800 1 1 15 3900 2022124 000002d0 \") DO @echo %C

 

These command reliable parse the input to give you just what you want, by making sure it’s delaminating on the colon : and a space. In both cases we want the third token.

davehaigh_3-1686850432671.png

 

At this point I need to get the files we want to process, and the findstr command into the FOR command. I’m having issues with the proper syntax. But I’m sure this can be rectified.

If I try and just manually put in a single file I want to process, instead of the string to parse, I get no proper output from the FOR command.

 

for /F "tokens=* delims=: " %A in ('findstr pname lid_7242380155819393026.wfcont') do set "partname=%B"

echo %partname%

 

davehaigh_4-1686850432676.png

 

Getting the part file name:

Since the part has both text and binary elements in the file, this section is causing me more problems.

There is a line in the file that starts with pname and it has the part file name in it.

 

This is what it looks like in NOTEPAD++

 

davehaigh_5-1686850432676.png

 

I can use the findstr command to get the text I’d like to parse,

findstr pname lid_7242380155819393026.wfcon

 

The output in the command window looks like this:

Note that the n after the first NUL is now a ± symbol in the command window.

davehaigh_6-1686850432677.png

 

If I take this text and add it to the FOR command I can parse out the file name by delaminating on the ± and _

 

FOR /F "tokens=1-3 delims=^±^_" %A IN ("pname ±1013120152_scene α") DO set "partname=%B"

echo %partname%

 

davehaigh_7-1686850432678.png

 

That seems promising: However……

If I redirect the output of the findstr command to a text file, I get unusable text.

 

findstr pname lid_7242380155819393026.wfcont > test.txt

 

davehaigh_8-1686850432679.png

I don’t know how to get the output of the findstr command to reflect the ascii text I see in the command window.

 

Drawings are a big problem. They don't have a pname in the file. 

instead of pname it just has name, but you would have to search for lines that begin with name, otherwise you there are two many matches.

 

davehaigh_9-1686850630699.png

However that isn't true for all drawings. If you use a different common name on a drawing, then what I show here is out the window. and I can find no string in the file that shows the actual name of the drawing. 

 

I don't think most folk would use a common name for a drawing, since they are likely looking for a drawing number anyway. But it is possible to do in Creo. 

 

Anyway this is as far as I've progressed in trying to solve this. 

Based on what I’m seeing in the Creo files, I don’t think there is a way to get back to the actual part name of the drawing file if a common name is used on it.

 

This may not matter as much since if all the parts and assemblies are renamed correctly then the drawing will open as it should, and the drawing can then be renamed based on what is in the drawing number field of the drawing.

 

davehaigh_0-1686852221445.png

 

It has been some time since I have logged in and I thought I would see what is going on with the cache tool. I usually stay quiet in the background, but today I stumbled upon this discussion and wanted to comment on a couple of things.

 

First is the exception that StephaneG is experiencing.

 

That is a bug that was fixed in the 2.08 release that was made available when I retired in 2020. It was previously found here (https://community.ptc.com/t5/Windchill/Windchill-Cache-Recovery-Tool/td-p/181971/page/2) but when I click that link now, it redirects me to a different page that states "This Content was Archived". I'm not sure why the post was archived, but that entire thread is gone. Perhaps someone can click the "Request Unarchive" button on that page.

 

Second is the discussion about the installer by RonanM and Marco_Tosin.

 

When my original installer was developed, the .NET environment that is required was not included by Microsoft in Windows, so the installer did the checks and provided the ability to download .NET from Microsoft. Today, .NET is included and updated whenever you do a Windows Update. That being said, the installer is only needed to set up the Start menu options and install the application under C:\Program Files. For those that do not have install privileges, you can simply place the WC_FileRecovery.exe in a folder on your computer and double-click the file and/or create a shortcut to it. The only other piece you need is the User Guide, which needs to be located in the same location as the WC_FileRecovery.exe file. I will upload the exe and pdf in a .zip file for you to use. Unzip the file to your computer at a location of your choice.

 

Third is Dave Haigh's comments regarding the recovered filename.

 

Dave, you are doing the same as me in my code, but I'm using Regular Expressions to find the information. The line that includes CMNM at the start is what you see in the Alternate Name column of the results. Then I look for "name", found in the body of the file, and capture the text following that string. If found, that is added to the Preferred Name column. If the Preferred Name is found, this is used to name the recovered file. If no Preferred Name is found but an Alternate Name is found, the Alternate Name is used to name the recovered file. My experience has shown this to provide the correct file name for the recovered files. Perhaps there are cases where my logic is not correct, but I've not seen that.

 

Ron Thellen

AndrewK
Community Manager
(To:Ron_Thellen)

@Ron_Thellen Thanks for pointing that out. I've unarchived the post.

Top Tags