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

Filtering PiTags using SDK Options · View
jay10298
#1 Posted : Tuesday, March 02, 2010 5:32:52 AM
Rank: Member
Groups: Member

Joined: 3/24/2009
Posts: 20
Location: Saudi Arabia
Dear PI People;

Is there a way to filter the tags using SDK? I have tried this in PIOLEDB using the "Like" statement in the sql where clause and works just fine, now i wanted to have the equivalent solution using the PISDK. any help is very much appreciated.

Thanks.

Jayson
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
RJK Solutions
#2 Posted : Tuesday, March 02, 2010 8:01:09 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 612
Location: Cheshire, United Kingdom.
Hi Jayson,

Indeed there is, you will need to make use of the "PISDK.Server.GetPoints" method. This will allow you to perform a query on the PIPoints table, where you can query the point attributes for tags, note, no data query.

e.g.
Code:

Dim PISrv As PISDK.Server = SDK.Servers("localhost")
Dim PL As PISDK.PointList = PISrv.GetPoints("tag='sinu*')


If there are no tags that match your filter, then an error is thrown.

Alternatively, if you require access to other PI tables then you can use the "PISDK.Server.GetPointsSQL" method. For tag searches, GetPoints gives better performance than GetPointsSQL.

Hope this helps.

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
jay10298
#3 Posted : Tuesday, March 02, 2010 11:47:37 AM
Rank: Member
Groups: Member

Joined: 3/24/2009
Posts: 20
Location: Saudi Arabia
that's it!! straight to the point!! bulls eye!! thanks a lot PI God!! Smile
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.