8 Replies Latest reply on Nov 7, 2011 8:39 AM by night2day

    Addtrace throws Error on Processbook Quit

    night2day

      Hello together,

       

      I just write a little util to autocreate some trenddisplays.
      The displays would be created with some VBA-Code within a Excel-Modul.
      All works fine with still one exception.

       

      For excample:

       

        Dim objProcessbook  As PBObjLib.Application
        Dim objDisplay      As PBObjLib.Display
        Dim objTrend        As PBSymLib.Trend
             
        Set objProcessbook = CreateObject("PIProcessBook.Application.2")
        Set objDisplay = objProcessbook.Displays.Add("Blahblah")
        objProcessbook.Visible = True
        Set objTrend = objDisplay.Symbols.Add(pbSymbolTrend)
        objTrend.AddTrace ("\\SERVER\SINUSOID")
        Set objTrend = Nothing
        Set objDisplay = Nothing
        Set objProcessbook = Nothing

       

      This code throws a
      ".NET-BroadcastEventWindow.2,0,0,0,33c0d9d.0:procbook.exe - Fehler in Anwendung"
      Error at closing the processbook (not at closing the new display).

      If I comment   objTrend.AddTrace ("\\SERVER\SINUSOID") out there is no problem.

       

      Is there any known reason for this issue?
      I explicit destroy all used objects so no dependencys should be left.

       

      Greetings
      Wolfgang