3 Replies Latest reply on Dec 12, 2011 4:14 PM by spilon

    VB code to Get list of Tags currently used by traces

    gkrueger

      Is there any way to get a list of tags currently being displayed on a Trend?  I was looking for something like a Traces collection that I could parse through and get the tag value for each trace, but I can't see anything like that in the Trend class.  

       

      I'm working on a simplified interface for adding tags to a trend using VB list boxes and I want to be able to test if a tag is already on then trend before a user tries to add it so I don't get the Runtime error.  If there is not a way to read tags from the Traces, then I will probably just have to trap the error and ignore it, but I figure reading the tag names is cleaner if its possible.

       

      Thanks in advance for any tips...

       

      Greg

       

       

        • Re: VB code to Get list of Tags currently used by traces
          Dim idx As Integer
          For idx = 1 To Trend1.TraceCount
             MsgBox Trend1.GetTagName(idx)
          Next
          

           

            • Re: VB code to Get list of Tags currently used by traces
              gkrueger

              Thanks Steve...that one looks pretty obvious...the reason I couldn't find it was it wasn't in the PB VBA reference doc I have...which is for version 3.2 which is dated 9/18/2009.  Is that Method a relatively new one?  Is there a newer copy of the VBA reference I should be using?

               

              Also, if it's possible to put a request in to the documentation department, that PB VBA PDF has some nice bookmarking, but it also has a bookmark for the Format, Arguments, Return, Notes, etc. for each Property, Method and Event which makes the bookmarks very cluttered and a bit harder to work with.

                • Re: VB code to Get list of Tags currently used by traces

                  @Gregory: you can always find the latest version of our documentation on the vCampus Library (see under vCampus PI Products Kit > Client Products > PI ProcessBook). Of course don't try to use a feature that is only listed in a later version of the doc, if you have an older vrsion of the product

                   

                  As far as your documentation request, all enhancement requests should normally go through our regular Technical Support. I suggest you open a ticket and mention that is is, indeed, a "documentation enhancement request" - they'll channel that through the right people...