5 Replies Latest reply on Mar 20, 2012 1:53 PM by andreas

    Trend.TrendTitle behavior


      I've noticed that when I set the .TrendTitle property of a trend object in PB using VBA script, the updated title does not display properly at the top of the trend until I've cleared the trend of all traces, then it shows the updated trend name properly.  Is that a bug or is there some other refresh call I need to make to get the updated title to display. 


      The code I'm using to update the title is straightforward, eg:   trntrend1.TrendTitle = "new title"







        • Re: Trend.TrendTitle behavior

          Just a bit more info related to my previous post.


          Here are screenshots showing what I'm seeing.  I created a button to pop up the message box which displays the current value of the .TrendTitle property and you can see it doesn't match what's showing on the trend.  If I clear the trend, then the Title displayed updates to match the property. 




          Here is after I clear the trend









            • Re: Trend.TrendTitle behavior
              Ahmad Fattahi



              It looks like it is a known issue. Please see this article for more information. The workarounds are:

              1. Change the TrendTitle using Define Trend dialog box.
              2. Without closing the Display, a "revert" also causes the title to change. The user can save the Display at a later time.


                • Re: Trend.TrendTitle behavior



                  As you are already in VBA - here is another workaround. If you disable the title and afterwards enable the title you will see the change:

                      ThisDisplay.Trend1.TrendTitle = "MyNewTitle " & Now()
                      Dim myTrendFormat As TrendFormat
                      Set myTrendFormat = ThisDisplay.Trend1.GetFormat
                      myTrendFormat.ShowTitle = False
                      ThisDisplay.Trend1.SetFormat myTrendFormat
                      Set myTrendFormat = Trend1.GetFormat
                      myTrendFormat.ShowTitle = True
                      ThisDisplay.Trend1.SetFormat myTrendFormat