5 Replies Latest reply on Feb 14, 2012 8:37 PM by Ahmad Fattahi

    Retrieve Tag Attributes for Value in an Element Relative Display?

    ryland

      I would like to programmatically (VBA) retrieve the span for the tag(s) of a symbol in an element relative display.

       

      I guess I don't know how to find the current AF context of the display, nor how to query AF for the Tagname once I have it.

       

      I spent a few minutes searching the forum  but didn't find anything that quite fit the bill.  Many thanks in advance!

        • Re: Retrieve Tag Attributes for Value in an Element Relative Display?
          Ahmad Fattahi

          Please see this thread to see some examples of how you can set and handle context relative to your PI AF assets in PI ProcessBook. Also this webinar may guide you in the right direction to use element relative displays in PI ProcessBook. Another useful resource is the white paper in vCampus Library under "White Papers and Tutorials > PI ProcessBook > A Few PI ProcessBook VBA Tips". Hope it helps.

            • Re: Retrieve Tag Attributes for Value in an Element Relative Display?
              Ahmad Fattahi

              We just uploaded an example of how you can access PI AF within PI ProcessBook. It shows how you can wrap AF SDK calls in a way that is visible to COM/VBA. Please look into vCampus Download Center under Extras.

               

              The example is courtesy of Ryan McErlean and David Hollebeek!

                • Re: Retrieve Tag Attributes for Value in an Element Relative Display?
                  ryland

                  You guys are awesome! This sounds exactly what I was wanting to do.  I'll check it out

                    • Re: Retrieve Tag Attributes for Value in an Element Relative Display?
                      gkrueger

                      Ahmad,

                       

                      Thanks for the upload.  I think that's something that will come in very useful to me as well (although I'm going to have to teach myself some C#.NET first in order to understand it!)  

                       

                      One question about this code, do you know if using calls to the AF SDK requires additional licensing?

                       

                      Currently I'm using some PI SDK calls to do some scripting with aliases/unit modules and my local sales rep informed me recently that using the PI SDK, even if it's in PI supplied clients like PB and Datalink, requires an additional license per user/per client.  Just curious if I convert my code to using the AF SDK, will I still need to purchase additional licensing or is that included?

                       

                      Thanks,

                       

                      Greg

                        • Re: Retrieve Tag Attributes for Value in an Element Relative Display?
                          Ahmad Fattahi

                          Greg,

                           

                          Let's divide your question into two parts for better clarification:

                           

                          1) As for development, your vCampus license covers all the products inside vCampus including access to PI System Data as well as PI Server and AF Server. You would not need any additional licenses on top of your vCampus membership.

                           

                          2) For runtime, PSA is required for any named user who intends to access PI System Data. PI System Data includes time series data as well as asset data inside AF Server. It also covers all methods of Data Access including SDKs, OLEDB, PI Web Services, and other methods. Any named user needs one PSA license through which they can access all servers (PI and AF) in the organization by any method of data access at runtime.

                           

                          As a result, in the runtime environment, if a named user already holds a PSA to use against PI SDK, they would not need additional licenses for AF SDK.

                           

                          Hope it answers your question.