How to open a File Explorer window with a PDM search result

I have a macro to create PDF and STEP files from a drawing. I can use the code below to open a File Explorer window with the folder where the files were created. However, there are hundreds of files in that folder. How do I get the File Explorer window to only show the results of a PDM search? I don't see how to get IEdmSearch7 to talk to a Windows File Explorer window.

Dim cmd As String
cmd = "C:\\WINDOWS\\explorer.exe " & exportPath
Shell cmd, vbNormalFocus
Answers 2
MD
MD 2025-05-22

Have you looked at IEdmEnumeratorCustomRefernce7.AddReference3?

WM
WM 2025-05-27

Have you considered using Search.exe instead of explorer? That can be executed with command line switches... Not sure if you can specify specific search parameter though: From the KnowledgeBase
---------
The standalone search tool (Search.exe) can be started from the SOLIDWORKS® PDM installation folder on a client (by default found under C:\Program Files\SolidWorks Corp\SOLIDWORKS PDM\Search.exe).

Usage: Search.exe

The following switches are valid (enclose each switch with double quotation marks and separate each switch with a space):
/V:[vault name] = File vault name to start search in
/S:[search card name] = Search card to display
/F:[favorite name] = Search favorite to start search with
/HF = Hide the search card
/HT = Hide the tree pane
/HP = Hide the preview
/P:[path] = Folder path to start search under. Specify full path or path relative to vault root.

Examples:
Open search tool in file vault 'Vault' and display the Complete Search card:
C:\Program Files\SolidWorks Corp\SOLIDWORKS PDM\Search.exe" "/V:Vault" "/S:Complete Search"

Open search tool in file vault 'PDM Vault' and run the 'checked out files' search favorite:
"C:\Program Files\SolidWorks Corp\SOLIDWORKS PDM\Search.exe" "/V:EPDM Vault" "/F:checked out files"

Open search tool in file vault 'TS_VAULT', display the 'TS_Custom_Search' card and start under 'Projects' folder:
"C:\Program Files\SolidWorks Corp\SOLIDWORKS PDM\Search.exe" "/V:TS_VAULT" "/S:TS_Custom_Search" "/P:\Projects" "/HT" "/HP"


To create a shortcut to run the search tool, please follow these steps.
1. Open Windows Explorer and navigate to the  PDM installation folder.
2. Right-click on Search.exe and select Copy.
3. Navigate to the target location where you wish to create the shortcut. Right-click and select Paste shortcut.
4. Right-click the new shortcut and select Properties.
5. In the Target field, add any additional search switches.
-------
perhaps combine with API?