ProcessBook - Issue controlling add/show traces in a trend

Discussion created by ericL on May 5, 2012
Latest reply on May 7, 2012 by andreas

Hi, Right now, I have a mechanism to open a display, show no traces in a trend. Now, as I click on a value, it adds/shows the trace of the element relative attribute on the trend. If I click again on it, it gives me the following error "Run Time Error 8327, The specified tag already exists" In essence, I am not putting a condition such as: "If tag is not showing, then show it" I am not sure how the syntax works. Any help would be much appreciated. Thank you,


Code example:

Private Sub ShowTrace(attr As String) 
   Trend3.AddTrace (attr) 
   Trend3.ShowTrace = True 
End Sub 

Private Sub Value59_Click(ByVal lvarX As Long, ByVal lvarY As Long) 
   Dim attr As String 
   attr = Value59.GetTagName(1) 
   Call ShowTrace(PDMS) 
End Sub