Hello,
The pipbvb.chm help file is really good once you are familiar with the objects and symbols within ProcessBook - it will become clearer for you the more you use it.
Of course there is a ProcessBook section on our forum for ProcessBook specific code examples:
http://www.rjksolutionsltd.co.uk/forum/yaf_topics9_PI-Tips-and-Tricks-PIProcessBook.aspxFor you particular scenario you need to work with the "Trend" object (see "Trend Class" in pipbvb.chm), in particular the Trend Methods "AddTrace, RemoveTrace and SetTagName" methods.
For example, if you have a Trend on your display called "Trend1" and a Combobox called "cb1" then you could have the code to change the trace shown:
Code:
Private Sub cb1_Change()
Call ThisDisplay.Trend1.SetTagName(1, cb1.Text)
End Sub
Alternatively, you could do something like the following:
Code:
Private Sub cb1_Change()
For i = 1 To ThisDisplay.Trend1.TraceCount
Call ThisDisplay.Trend1.RemoveTrace(1)
Next i
Call ThisDisplay.Trend1.AddTrace(cb1.Text)
End Sub
Principal Consultant
Real-Time Data Management @ Wipro Technologies