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

Add a value to a trend along with it's name Options · View
ALanier
#1 Posted : Tuesday, March 01, 2011 5:45:46 PM
Rank: Newbie
Groups: Member

Joined: 1/17/2011
Posts: 8
Location: Florida
Good afternoon:

I am wondering if I can add a value to a trend along with it's name. I seems that this should be simple. But I am not getting it right. Please help! Thanks very much for your time.

Sub Add_Value_to_a_Trend()
Set a.Value = 8
Trend1.AddTrace a
End Sub

Confused -ALanier
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.
ALanier
#2 Posted : Wednesday, March 02, 2011 4:13:00 PM
Rank: Newbie
Groups: Member

Joined: 1/17/2011
Posts: 8
Location: Florida
I found my answer at a previous post:
jc113883 Posted: Monday, December 20, 2010 7:45:54 PM

I had to see it with new eyes this morning.

I only had to tweak the following line,
MyDataset.Expression = "'tagname'*2"

If anyone does get to read this, if I want my expression to be MyDataset.Expression = 2*2
then it does not recognize the column Value somehow.
I must go in the trend via gui (manually) and click the Expression, then click the box for Column, and then I'm ok to move on.

This just seemed strange.

Anyhow, overwriting the Values works, and I am happy!
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.