2 Replies Latest reply on Nov 16, 2016 3:49 PM by exelejames

    Is there an AFSDK PIPoint attributes dialog control?



      I'm sorry if this is something too basic, but I've been searching for about a half-hour without finding what I'm looking for.

      Is there a dialog provided in the AFSDK that displays a PIPoint's attributes (or properties)? I'm seeing one in PI System Explorer:

      I think the PISDK provided a similar dialog, is there one in the AFSDK? Or is the attached dialog available for programmatic use, or is this something I would have to build on my own?

        • Re: Is there an AFSDK PIPoint attributes dialog control?

          Try the following code in a Windows Form project:


              static class Program
                  static PISystems afServers = new PISystems();
                  static PISystem sys;
                  static AFDatabase afDB;
                  static AFElement elem;
                  static AFAttribute attrib;
                  static PIServers srvs = new PIServers();
                  static PIServer srv;
                  static OSIsoft.AF.PI.PIPoint pt;
                  /// <summary>
                  /// The main entry point for the application.
                  /// </summary>
                  static void Main()
                      PIPoint pt = PIPoint.FindPIPoint(@"\\kingvmfarm\sinusoid");
                      List<PIPoint> list = new List<PIPoint>();
                      if (list == null || list.Count <= 0) return;
                      if (list.Count == 1)
                          AFOperations.ShowProperties(null, list[0], null, null, null, false);
                          AFOperations.ShowProperties(null, list, null, null, null, false);
                      Application.Run(new Form1());
          3 of 3 people found this helpful
            • Re: Is there an AFSDK PIPoint attributes dialog control?

              Thank you, Jason!


              I'm still wondering why this was so hard for me to find. I'm blaming a combination of user error (ahem), the user not searching through enough example code (ahem, again), difficulty searching the help files, and thinking there might be a forms control similar to the one provided for AF Attributes ("UI.PropertyPage.AFAttributesPage").