6 Replies Latest reply on May 30, 2012 8:10 PM by sovain

    adding a new trend /  remove /  Maximize

    sovain

      Hi guys,
      I am trying to play with trends in ActiveView using C#, some functionality is really strange.

      On adding a new trend I want to remove old one and add the same with some new options.
      1. I see that the old trend is never deleted
      2. Maximize is not working.
      Could someone help ?

      Thank you
      Oleg

       
      Trend1Display = ((AxPBDCtrl.AxPbd)axPbd_define_trend).Display as PBObjLib.Display; 
      foreach (PBObjLib.Symbol symbol in Trend1Display.Symbols) 
      Trend1Display.Symbols.Remove(symbol); 
      
      PBSymLib.Trend MyTrend; 
      MyTrend = (PBSymLib.Trend)Trend1Display.Symbols.Add(PBObjLib.pbSYMBOLTYPE.pbSymbolTrend); 
      foreach (TagListViewItem TagItem in f_definetrend.list_tags.Items) { 
      MyTrend.AddTrace(TagItem.Text);
      mytrendFormat.ShowServerName = f_definetrend.servername; 
      mytrendFormat.ShowEngUnits = f_definetrend.engunits; 
      mytrendFormat.ShowDescription = f_definetrend.description; 
      mytrendFormat.ShowGrids = f_definetrend.grids;
      // ........ 
      MyTrend.Maximize(true); 
      }
      

       

       

       

       

      3531.1.JPG