YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Calling the "Tag Search" window in Excel using VBA Options · View
matthiasdg
#1 Posted : Tuesday, October 20, 2009 10:39:09 AM
Rank: Newbie
Groups: Member

Joined: 10/20/2009
Posts: 1
Location: Budapest
Hello,

I am looking for a way to call the "Tag Search" window using VBA.

I want people using my program to have a way to put a certain tag of their choice in the list of tags that need calculating.

So I have the following options:
1) they need to search it first using PI or the Excel Tag Search and copy the number then use the form I use in my program to indicate what calculations have to be done and where they have to be mailed to/ stored.

2) the more userfriendly way which I would prefer to use:
They can use the "browse" button on the form they called up and that one fills in the correct tagname for them after they selected it from the Tag Search window.

I tried recording the call with a "record macro" but unfortunately the "tag search" leaves the recording blank, which is why I ask here what the correct syntax is.

Thank you,
Matthias
Sponsor  
 
RJK Solutions
#2 Posted : Tuesday, October 20, 2009 1:02:10 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 409
Location: Cheshire, United Kingdom.
Hi Matthias,

Welcome to the forum.

You need to add 2 references to your VBA project:

- PISDK Type Library
- PISDK Dialogs

Then you can call the Tag Search and retrieve a PISDK.PointList object.

For example:

Code:

Private PList as PISDK.PointList

Private Sub CallTagSearch()

Set PList = PISDKDlg.TagSearch.Show()

Debug.Print "Number of tags selected = " & PList.Count

End Sub


The PointList object is a collection of PIPoint objects.

Enjoy!

Rhys.


OSIsoft PI System Specialists
PI consultancy on PI Systems, PISDK, AFSDK, OLEDB etc and PI custom developments. Well pretty much anything to do with PI!


Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.