Home Search

DriveWorks Pro 24
PDMFileSearch

Send Feedback

PDMFileSearch

Returns a table array of the files matching the search criteria.

The SOLIDWORKS PDM Professional plugin must be installed and enabled for this function to calculate.

Syntax

PDMFileSearch(Search Text, [Folder], [Refresh], [Vault Name])

Where:

Search Text is a string that contains the search criteria (use % as a wildcard).

Folder (optional) is the full path to a folder in the local view of the vault from which to start the search (Leave blank to search the entire vault).

Refresh (optional) is a value that refreshes the data when changed.

Vault Name (optional): The name of the vault to use. If no vault is given, the first listed in the plugin settings will be used.

Example

RuleMeaning
PDMFileSearch("MainDriveAssembly.sldasm", "C:\PDMVault\Assemblies", DWConstantRefreshNow, "Shop Data")Returns a table array of results based on searching for MainDriveAssembly.sldasm in the folder C:\PDMVault\Assemblies and its subfolders in the Shop Data vault. The search will be refreshed whenever the value of the constant RefreshNow changes.

{"Name","FilePath","Version","State","Checked Out To","Checked Out On";"MainDriveAssembly.sldasm","C:\PDMVaultStandardFiles","2","Checked In","",""}

Using a Wildcard

This function allows for a wildcard (%).

A wildcard is used to replace or represent one or more characters.

For Example:

PDMFileSearch("%DriveWorks 123%")

will return a table array of information for all files that contain DriveWorks 123 any where within the string, such as:

  • Ladder DriveWorks 123.sldprt
  • DriveWorks 123 Ladder.sldasm
  • Main DriveWorks 123 Ladder.sldasm