AnsweredAssumed Answered

What is the VBA Code to return a Set of Specific Tags with a specific Keyword into a List Box in PI ProcessBook?

Question asked by Muthulingam-EnQuest on May 30, 2018
Latest reply on May 31, 2018 by Muthulingam-EnQuest

Hi guys,

 

I need a VBA Code to return a Set of Specific Tags with a specific Keyword into a List Box in PI ProcessBook.

I would like to create a Check Box in PI ProcessBook.

When the Check Box is checked it returns a Set of PI Tags/ Points with a certain Keyword in the Description  into a List Box.

 

For Example:

Lets say I have marked 100 Tags out of 6,000 Tags with the following Keyword  "Well Parameter" in the Description.

I want the VBA Code to return all the 100 Tags (with the Tag Description) with the specific Keyword mentioned above.

I can't find it in the PI ProcessBook Programmer's Guide.

 

Use Case:

- to display the Tag Name and Tag Description in the List box

- This list can later be used by End users to generate Trends

 

I found this Code from Patrice Thivierge (Thanks Patrice):

 

Procedure : TagSearch 

' Purpose   : Opens the Tag Search dialog and print the selected tags into 

' the Immediate Window (Crtl+G) 

'--------------------------------------------------------------------------------------- 

Public Sub TagSearch() 

    Dim search As New PISDKDlg.TagSearch 

    Dim selectedPoints As PointList 

 

 

    Set selectedPoints = search.Show 

 

 

    Dim point As PIPoint 

    Dim p As Variant 

    For Each p In selectedPoints 

        Set point = p 

        Debug.Print point.name 

    Next 

 

 

End Sub

 

I just need the Tag Keyword Search VBA Code

 

Best regards,

 

Muthulingam Ramiah

 

Ganesh Supromaniam

Patrice Thivierge

Outcomes