I have one AF attribute which has constant value. and i want the value of it to be change through processbook. Like, processbook screen will have one input box. and once we enter some value in the input box, that value should go into AF attribute.
This is a difficult task for ProcessBook to perform.
If the attribute were a PI point data reference, instead of a static attribute ('none' data reference), then you could write to the pi point directly as described in this post How to write value to a tag by PI processbook? As you'll see below, this is beyond a doubt the best method for changing the value of an attribute.
The problem with an attribute is that the AFSDK is .NET but ProcessBook is COM based. The object model is exposed via VBA, which does not work natively with .NET code. The PISDK is COM, so it works perfectly well with VBA and ProcessBook, but the PISDK cannot write to an AF attribute. The AF-based Add-ins that come with ProcessBook are written in .NET code and use the AFSDK, and they do so by taking advantage of the ProcessBook interop libraries (interop meaning interopability between COM and .NET). They do not, however, provide a way to write a value back to the AF server.
For interaction with the AFSDK, there's a few options, none of which are good:
1. Use VBA to make an HTTP call, and direct it to the PI Web API
2. Write a custom add-in that uses the AFSDK to perform the write operation and uses the interops libraries to interact with ProcessBook. There's a lot of overhead here and should not be attempted without prior development experience.
As a different approach, using PI System Explorer would be an option since that application should be installed on any machine with the AFSDK, and if the user would have had permission to change the value in ProcessBook, then they will have permission to it directly in PSE. This isn't the same user experience of having it in a text box in ProcessBook, but this can be done without switching the attribute to a pi point data reference.
Retrieving data ...