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

PIData to IPIData2 Options · View
jay10298
#1 Posted : Wednesday, November 16, 2011 8:00:13 AM
Rank: Member
Groups: Member

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

I have a code that works well on VB using the IPIData2 but when i try to convert my code to c#, below error is returned:


"CS0266: Cannot implicitly convert type 'PISDK.PIData' to 'PISDK.IPIData2'. An explicit conversion exists (are you missing a cast?)"

I am using IPIData2 to be able to use the InterpolatedValues2 method.

any idea?

Regards,

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 : Wednesday, November 16, 2011 11:58:07 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Try...

PISDK.PIData pid = myPIPoint.Data;
PISDK.IPIData2 ipd2 = (PISDK.IPIData2)pid;
Principal Consultant
Real-Time Data Management @ Wipro Technologies
jay10298
#3 Posted : Friday, November 18, 2011 6:12:23 AM
Rank: Member
Groups: Member

Joined: 3/24/2009
Posts: 20
Location: Saudi Arabia
problem solved...thanks a lot!!

jayson
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.