1 Reply Latest reply on Aug 29, 2011 2:27 AM by hanyong

    Tag show and tag name

      Hello !!!
      I have the following code to access the "tag search",
      'dim p
      'September ap = createobject ("PISDKDlg.ApplicationObject")
      'dim ts
      'set ts = ap.TagSearch
      'ts.Show Nothing)
      I now need to copy the name tag of "tag search" for a field "label".
      what do I do?

        • Re: Tag show and tag name

          Hi Eduardo,


          Not sure about what environment you are attempting to do this. Are you writing a VBA script in PI ProcessBook or Excel for this?


          Here's what I would do in ProcessBook VBA if I need to call the PI SDK Tag Search dialog and get the selected tag name to a Text symbol

          Dim p As PISDKDlg.TagSearch
          Dim ptlist As PointList
          Set p = New PISDKDlg.TagSearch
          Set ptlist = p.Show
          Dim pt As PIPoint
          Set pt = ptlist(1)
          ThisDisplay.Text1.Contents = pt.Name


          I am assuming that there is a Text1 symbol already added to the display. And only getting the first selected tag from the tag search dialog result.


          Is this what you are looking for?