MX$0.00
0

How to Bulk Update SOLIDWORKS PDM Data Cards From Excel

Fix Description, Part Number or any other variable on hundreds of SOLIDWORKS PDM files from one CSV file, without opening a single data card.
How to Bulk Update SOLIDWORKS PDM Data Cards From Excel
Picture of Amen Jlili

Amen Jlili

Amen Jlili is the founder and technical director of Blue Byte Systems Inc., a software company in Vancouver, Canada, specializing in automating SOLIDWORKS and PDM.

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.

  1. Export the files and the variables you want to change:
  2. Open data.csv in Excel and edit the values. Keep the first column, the file ID, as it is.
  3. 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.csv for 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.

Need this adapted to your workflow?

We build custom SOLIDWORKS macros, add-ins and PDM automation.

Picture of Amen Jlili

Amen Jlili

Amen Jlili is the founder and technical director of Blue Byte Systems Inc., a software company in Vancouver, Canada, specializing in automating SOLIDWORKS and PDM.

Leave a Comment

0
0
Your Cart
Your cart is emptyReturn to Shop