Site icon BLUE BYTE SYSTEMS INC.

PowerShell PDMShell Search Command: Complete Guide for SOLIDWORKS PDM Administrators

PDMShell gives SOLIDWORKS PDM administrators the ability to run precise, scriptable, and automated operations across large sets of files, and the PowerShell PDMShell search command is at the center of that capability. One of its most powerful features is the unified search syntax unlocks a completely different level of control over your PDM vault.

Consider the following search command:

At first glance, it may appear complicated, but every element serves a clear purpose and is easy to understand once broken down.

Name=%.sldprt

This filter targets all part files (SLDPRT) using a wildcard pattern.
The use of % allows flexible pattern matching, returning any file that ends with .sldprt regardless of prefix or naming convention.

Recursive=true

This instructs PDMShell to search not only the current folder, but all subfolders beneath it.
This is especially important for large vaults, deep project structures, or multi-level assemblies.

@Document Number~143

This uses a variable-based search.
PDMShell looks up the PDM variable named “Document Number” and applies a contains (~) comparison against the value 143.

Variable search supports all standard comparison operators, including equals, greater than, less than, contains, and more.

What makes this system so powerful is that the same search filter can be passed into a wide range of PDMShell commands. You write the search once, and then apply it to whatever action you need to perform. Below are the PDMShell commands that fully support the -search parameter, along with direct documentation links:

Version Control

frogleap (increment, decrement, or manage versions)
https://pdmshell.com/src/FROGLEAP.html

Bulk Variable Updates

setvar (update PDM variables in bulk)
https://pdmshell.com/src/SETVAR.html

File Removal

delete (soft-delete matching files)
https://pdmshell.com/src/DELETE.html
destroy (permanently remove matching files)
https://pdmshell.com/src/DESTROY.html

Local Cache Retrieval

get (retrieve files to local cache)
https://pdmshell.com/src/GET.html

Publishing and Exporting

export (PDF, DXF, STEP, and custom publishing)
https://pdmshell.com/src/export.html

SOLIDWORKS Automation

runswmacro (open SOLIDWORKS and execute a macro on each file)
https://pdmshell.com/src/runswmacro.html

File State Management

checkout
https://pdmshell.com/src/CHECKOUT.html
checkin
https://pdmshell.com/src/CHECKIN.html

If you would like more examples, additional documentation, or help building automated workflows, reach out anytime.

Exit mobile version