Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Version 2.07 includes the following new features:
Ron Thellen
For those who have limitations in installing SW on their PCs, here is the version of the application I made portable.
Marco
Hello Ron,
Is there a tool which support recovering Solidworks files from windchill cache?
Rupak
Currently the tool only supports recovery of Creo files. I'm not aware of any other recovery tool.
Ron
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.
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
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.
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 ?
Best regards
Stéphane
Try to use the portable version
Hello Marco,
Thanks, I tried but similar error message "the index is outside the bounds of the array"
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?
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
This file header shows an assembly that has not had the common name customized.
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
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.
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%
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++
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.
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%
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
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.
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.
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
Late congratulations on your retirement! Any chance of getting the source code so we don't have to start from scratch when Microsoft or PTC inevitably decides it shouldn't work anymore?