Vault Data Standard Search with 2 properties

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have implemented Vault DataStandard on my computer and I'm trying to modify it to fit my company needs.
With VDS, I can prevent using the same Part Number, which is great, but the problem is that I also need to have the possibility to use the same PN for differenttype of file.
For example, I have a part (.ipt) or an assembly (.iam) which is already in Vault, but now, I need to create the drawing of this part/assembly.
Part --> 123-45678 - Example.ipt
I need to have :
Drawing --> 123-45678 - Example.idw
In The VDS "Default.ps1" code, I have seen that the search in Vault is made using "FindFilesBySearchConditions".
Is there a way to search with 2 conditions?
function PartNumberChanged
{
$srchCond = New-Object Autodesk.Connectivity.WebServices.SrchCond[] 1
$srchCond[0] = New-Object Autodesk.Connectivity.WebServices.SrchCond
$srchCond[0].PropDefId = 88
$srchCond[0].SrchOper = 3
$srchCond[0].SrchTxt = $Prop['Part Number'].Value
$srchCond[0].PropTyp = "SingleProperty"
$srchCond[0].SrchRule = "Must"
$bookmark = ""
$status = New-Object Autodesk.Connectivity.WebServices.SrchStatus
$files = $vault.DocumentService.FindFilesBySearchConditions($srchCond,$null,$null, $false, $true, [ref]$bookmark, [ref]$status)
if($files -ne $null) { [System.Windows.Forms.MessageBox]::Show("Part number already exists!!!!","Wrong part number",[System.Windows.Forms.MessageBoxButtons]::OK,[System.Windows.Forms.MessageBoxIcon]::Error) }
}
In advance, thank you for your help on this.