telventaustralia

Problem with Process Book Cursors from VBA code

Discussion created by telventaustralia on Jun 26, 2009
Latest reply on Jan 19, 2015 by gonmerciel

We are adding cursors to multiple trends in one process book display programatically from VBA code. We are facing some kind of display refreshment problem (although we are not sure). For example, we have 10 trends in one display and we add cursors to all trends from VBA code, sometimes we can see the cursors, but sometimes not. Generally if trends are visible on display, then it puts the cursor in right position. If out of 10 trends, 5 is in user visble display area, then we can see the cursors, but we can not see cursors in other 5 trends which are not user visible area. For example, we are using VBA code in a for loop for all trend as follows:

ThisDisplay.Symbols.Item(TrendName).AddCursor
ThisDisplay.Symbols.Item(TrendName).CursorTime = time as string
ThisDisplay.Refresh
Delay = 5000

Also smetimes, it puts the cursors correctly if we put some message in the code like Msgbox("Testing Cursors").

 

Would you please provide us some assisstance for the same. Thanks.  Mauricio

Outcomes