Home Search

DriveWorks Pro 22
PDMBasicSearch

Send Feedback

PDMBasicSearch

Returns a table array of search results.

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

Syntax

PDMBasicSearch(Search Conditions, [Search Latest Versions Only])

Where:

Search Conditions is a table containing conditions, with a header row, where each row has 2 or 3 columns, the first of which is the variable name, the second is the value and the optional third is the operator.

Search Latest Versions Only (optional): Pass True to Search Latest Versions Only and False to Search All Versions.

Example

RuleResultMeaning
PDMBasicSearch(DwLookupPDMSearch){"Name","FilePath","Version","State","Checked Out To","Checked Out On"; "MyPart.sldprt","C:\PDMVault\Pressure Vessel\StandardFiles","2","Checked In","",""}Returns a table array of results.

Example Table (DwLookupPDMSearch)

VariableValueOperator (Optional)
CustomerDriveW%
QuotePrice2499125

The first line of the table above will return all records where the PDM Variable Customer contains the string DriveW

Using the wildcard (%) after the string will search for all records that start with DriveW

Using the wildcard (%) before the string will search for all records that end with DriveW

When no operator is given the search will default to String Contains (Enum 106)

The Operator column draws on the Enum data supplied by SOLIDWORKS.

Please see SOLIDWORKS PDM Professional API Help for up to date information regarding the available Enums.

For reference the available Enums are listed below:

OperatorMemberEnum
Date Equal ToEdmVarOp_DateEqualTo130
Date Greater ThanEdmVarOp_DateGreaterThan133
Date Greater Than Or Equal ToEdmVarOp_DateGreaterThanOrEqualTo135
Date Less ThanEdmVarOp_DateLessThan132
Date Less Than Or Equal ToEdmVarOp_DateLessThanOrEqualTo134
Date Not Equal ToEdmVarOp_DateNotEqualTo131
Number Equal ToEdmVarOp_NumberEqualTo120
Number Greater ThanEdmVarOp_NumberGreaterThan123
Number Greater Than Or Equal ToEdmVarOp_NumberGreaterThanOrEqualTo125
Number Less ThanEdmVarOp_NumberLessThan122
Number Less Than Or Equal ToEdmVarOp_NumberLessThanOrEqualTo124
Number Not Equal ToEdmVarOp_NumberNotEqualTo121
String ContainsEdmVarOp_StringContains106
String Does Not ContainEdmVarOp_StringDoesNotContain107
String Equal ToEdmVarOp_StringEqualTo100
String Greater ThanEdmVarOp_StringGreaterThan103
String Greater Than Or Equal ToEdmVarOp_StringGreaterThanOrEqualTo105
String Less ThanEdmVarOp_StringLessThan102
String Less Than Or Equal ToEdmVarOp_StringLessThanOrEqualTo104
String Not Equal ToEdmVarOp_StringNotEqualTo101