1 Reply Latest reply on Dec 15, 2016 4:00 AM by Kenji Hashimoto

    How to get PIPoint from AFElement?

    rcheung
      void Main()
      {
        var PIAFServers = new PISystems();
        var PIServers = new PIServers();
      
        var PIAFServer = PIAFServers["DEVAFPI"];
        var PIServer = PIServers["DEVPI"];
      
        var pointSources = PIServer.PointSources.Where(ps => ps.PointCount > 100);
      
        var database = PIAFServer.Databases["ABC Alerts"];
      
        var notifications = AFNotification.FindNotifications(database, "CommStatus*",
        AFSearchField.Name, AFSortField.Name, AFSortOrder.Ascending, 1);
      
      
        foreach (var notification in notifications)
        {
            AFElement element = (AFElement)notification.Target;
            element.Attributes.Dump();
            Console.WriteLine(notification.Name + " - ");
        }
      }
      
      
      
      

       

      I'm using LINQPad and when I use the Dump() I can see that PIPoint is part of the Dump but I can't seem to access it? What is the proper way to access the PIPoint from an AFElement?

       

      Thanks,