Hello, welcome to the forum.
Well I presume Value4 is a ProcessBook Value symbol, so this is the type for your variable.
A Value symbol then has a method to return the current value, "object.GetValue(vrDate, vrStatus)". Use this for your current value - vTime will give you the time for the value.
If I was to use your code I would change it to:
Code:Sub Value4_DataUpdate()
Dim MyLine As Line
Set MyLine = ThisDisplay.MyLine
Dim D As Value, vTime As Variant, vStat As Variant
Set D = ThisDisplay.Value4
With MyLine
.Name = "MyLine"
'Changes direction of arrow based on winddir value
.Endpoints(1).X = -14586 'left
.Endpoints(1).Y = 13415 'top
.Endpoints(2).X = (-14586) + (Sin(D.GetValue(vTime, vStat) / 180 * 3.14159) * 185)
.Endpoints(2).Y = 13415 + (Cos(D.GetValue(vTime, vStat) / 180 * 3.14159) * 185)
'set line color and styles
.LineColor = pbBlue
.LineStyle.Style = 0
.LineStyle.Weight = 2
'add arrow on right.
.LineStyle.End = 3
End With
End Sub
Principal Consultant
Real-Time Data Management @ Wipro Technologies