A missing Description on 300 parts, a project number that changed, a supplier code that was never filled in. Data card cleanups are some of the most common jobs a SOLIDWORKS PDM admin gets, and doing them one card at a time takes days.
The manual way
Open each file’s data card, check it out if needed, type the value, save, check in. Repeat for every file. Even with the Explorer’s multi-select card editing, you can only set the same value on every file at once.
The faster way: export, edit in Excel, write back
PDMShell lets you export the current values to a CSV, edit them in Excel, and write them back with setvarsfromsource.
- Export the files and the variables you want to change:
- Open
data.csvin Excel and edit the values. Keep the first column, the file ID, as it is. - Write the values back to the vault:
# 1. export the current values of every part below this folder
search -search %.sldprt -recursive -columns Description,"Part Number" -csv data.csv
# 3. write the edited values back
setvarsfromsource -source data.csv
How the CSV works
- The first column is the file ID. Every other column is a variable name, with one value per file.
- Include the file extension in the CSV name. The file can live outside the vault.
- You can also build the CSV with
dir -columns Description,"Part Number" -csv data.csvfor a single folder.
Tips
- Test on a small folder first and check a few data cards before running it on the whole vault.
- Keep the original export. If something goes wrong, it is your undo list.
- Your PDM permissions still apply, so files you cannot edit are reported, not changed.
Try it on your own vault
Start a free 7-day trial of PDMShell, see plans and pricing, or read the setvarsfromsource reference. Questions? Book a short call with our team.