Message 1 of 4
Vault Search with criteria error
Not applicable
04-01-2017
04:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I Have a problem with vb.net and Vault.
I would find file with criteria (one file with code)
Of this file extract the Boom.
Search drawing contents in the file of the Boom
Open this drawing.
This my code for search:
Public Function getFileIteration(nameOfFile As String, connection As VDF.Vault.Currency.Connections.Connection) As VDF.Vault.Currency.Entities.FileIteration
Dim SrcCond As New SrchCond
With SrcCond
.PropDefId = 8
.SrchOper = 1
.SrchTxt = nameOfFile
.PropTyp = PropertySearchType.SingleProperty
End With
' search for files
Dim Bookmark As String = String.Empty
Dim Status As SrchStatus = Nothing
Dim FileList As New List(Of Autodesk.Connectivity.WebServices.File) '()
While (Status Is Nothing OrElse FileList.Count < Status.TotalHits)
Dim files As Autodesk.Connectivity.WebServices.File() = connection.WebServiceManager.DocumentService.FindFilesBySearchConditions(New SrchCond() {SrcCond}, Nothing, Nothing, True, True, Bookmark, Status)
If (files IsNot Nothing) Then
FileList.AddRange(files)
End If
End While
Dim oFileIteration As VDF.Vault.Currency.Entities.FileIteration = Nothing
For i As Integer = 0 To FileList.Count - 1
If FileList(i).Name = nameOfFile Then
oFileIteration = New VDF.Vault.Currency.Entities.FileIteration(connection, FileList(i))
End If
Next
ListBox1.Items.Add(oFileIteration)
Return oFileIteration
End FunctionI have this error:
Error:
Autodesk.Connectivity.WebServices.VaultServiceErrorException: '4602'
if i load the entire list of vaults file everything works
Please help!!

