AnsweredAssumed Answered

Type Error when trying to use AFAttributeSearch

Question asked by mchampagne17 on Sep 4, 2019
Latest reply on Sep 4, 2019 by mchampagne17

I am trying to use the AFAttributeSearch Method.  I am following the example in the PI SDK, and I am getting Type Expected Error.

Here is the code


Using search = New AFAttributeSearch(AfDatabasePicker1.AFDatabase, "FindAttributes", "Name:'Decatur\East Plant\Isolate 2'")
    search.CacheTimeout = TimeSpan.FromMinutes(10)
    If search.ThrowOnError Then
        MsgBox("we have a problem Houston")
    End If
    count = search.GetTotalCount
    Console.WriteLine("found {0} Elements.", count)
    For Each item As AFAttribute In search.FindObjects()
        Console.WriteLine(" Attribute Name: {0} ", item.Name)
End Using


What am I doing wrong