Finding PI Tags in PBObjLib.Symbols

Discussion created by CalebH on Sep 4, 2009
Latest reply on Jun 2, 2015 by James.DeMarco

Hello - just started development on a ProcessBook Add-In and had a question.  I need to find out which PI tags are in certain controls (ex Trend, Value, etc).  I can access the Trend and Value objects but don't know what's next - is there a list of traces with the server and tagname/pointid for each tag on the trend?  Is there a way to tell if the trace is actually a PE eqn?  This is what I have so far which gives me (I think) the Trend and Value objects.  Haven't tried others yet.

Private theApp As PBObjLib.Application

If theApp IsNot Nothing Then
    disp = theApp.ActiveDisplay

    For Each sy As PBObjLib.Symbol In disp.Symbols

        Select Case sy.Type

            Case PBSymLib.pbSYMBOLTYPE.pbSymbolTrend
                Dim mytrend As PBSymLib.Trend = CType(sy, PBSymLib.Trend)
                'this for loop doesn't actually work - trying to figure out how to loop through traces in a trend
                For i As Integer = 0 To mytrend.TraceCount - 1


            Case PBSymLib.pbSYMBOLTYPE.pbSymbolValue

                Dim myVal As PBSymLib.Value = CType(sy, PBSymLib.Value)
                'trying to figure out how to get the server/tag information from the Value object

        End Select


End If

I am using VS 2008 and would like this to work for ProcessBook 3.0.x and 3.1.x