Search Cache While Working Offline in SOLIDWORKS PDM

Article by Francisco Guzman on Feb 19, 2020

When working offline, it is impossible to search the local cache in SOLIDWORKS PDM Vault View. With an increasing number of our customers needing to work offline, due to “Stay-at-Home” orders in the COVID-19 pandemic, I decided to make public a tool I created to search the cache. The process is simple and primitive, nevertheless, it works. It provides a way to search for files that you may have cached in your vault view while working offline. 

design from home

Logistics 

The tool is a batch file. The batch file can be downloaded here. 

Because this is a batch file, your security settings may flag it during download. For this reason, the link above contains a “.txt” file too. Also, the script itself is mentioned below. You can copy and paste the script into a text file. Rename the extension from .txt to .bat. 

Considerations

  • Do not run this against a connected (green folder) Vault View. It is intended for Views that are set to “Work offline” (blue folders).
    • Work offline is accessed through the PDM Vault View > Tools > Work offline
  • Do not edit any of the script other than what it is instructed here. 
  • You must first configure the batch/script to specify the location of your Vault View. The instructions are below.
  • The tool is provided for free, and “as-is” with no support and no warranty expressed or implied.

Configuring the script: a one-time thing 

Right mouse click on the batch file and select “Edit”. This will open Notepad and the script will be shown. 

configuring a script solidworks pdm

Edit the line with the path to your Vault View as shown in blue. Keep the quotation marks as they are. Save and Close. DONE.

edit vault view

How it works 

The script pulls all the file names and corresponding directory from the Vault View folder and sub-folders using the “dir /s” command. The “ | clip” portion puts all the info it collected into your clipboard. Once it is in your clipboard, you can paste it into notepad, which the script opens automatically for your convenience. Once it is in Notepad, all the contents are searchable by name.

directory of my vault solidworks pdm  

Running a search 

When you want to search your cache, double click the batch file. And follow instructions 1-4.

search cache while working offline solidworks pdm

When you get a few searches under your belt, you’ll find how quick it is to run it. Double click the batch file, press any key to open Notepad, Ctrl+v to paste, Ctrl+F, and search away. 

Raw Script 

:: In line below replace example path with your path to PDM Vault View. Keep quotation marks. 

cd "C:\MyVault\" 

:: Do not edit below this line 

:: Do not run against connected Vault View (for offline only) 

dir /s | clip 

@echo off 

echo. 

echo ~~~~~~FILE DIRECTORIES SUCCESSFULLY COPIED TO CLIPBOARD~~~~~~ 

echo. 

echo 1. Notepad will open automatically after pressing any key to continue. 

echo 2. PASTE clipboard contents into Notepad to perform search - Ctrl+v. 

echo 3. Search for file name using Ctrl+F or "Edit, Find..." in Notepad. echo 4. Search "UP" or check box "Wrap Around" in Notepad search dialog. 

echo. 

echo created by FCO. GoEngineer 

Pause 

%windir%\system32\notepad.exe

Related Articles

Working Offline With SOLIDWORKS PDM Tips and Tricks

VPN Considerations for IT, Administrators, and Users

SOLIDWORKS PDM Backup Awareness

YouTube video setting only test vaults in solidworks Settings Only Test Vault 

YouTube video improve design and work as a team in solidworks Improve Design Work as a Team

 

About Francisco Guzman

Francisco Guzman is the PDM Technical Support Lead at GoEngineer, and is pursuing his degree in mechanical engineering at the University of Utah. In addition to providing guidance and support to SOLIDWORKS and SOLIDWORKS PDM customers, Francisco also provides support for DriveWorks design automation. He won the world-wide DriveWorks reseller CPD contest as the best DriveWorks AE for 2015. For fun, he designs, 3D-Prints, builds and races custom first-person-view (FPV) racing drone frames.

View all posts by Francisco Guzman