1 of 1 people found this helpful
Have you thought of using PI Web API? if it is available, and you can find all the calls you need, that would be a good solution on the long term.
Wrapping AF SDK calls into a COM exposed dll may work, but personally I find it difficult sometimes to work with especially for the deployment part.
If this is really the path you want to go with you can:
- Write a COM wrapper to expose AF SDK functions to excel --> see example here AF Wrapper For ProcessBook
- Create a VSTO Excel AddIn that will integrate with excel
- Create your AddIn with Excel-DNA. I have used it successfully in the past as I found it easier to deploy (the .xll format is easy), to use. But beware you don't have intellisense on the Excel objects. But this is really a question of preferences.
Worth to mention, Visual Studio allows you to create a Click Once installation package. This allows you to place the installer on a network drive, and after users install it from there, each time they start the application, it will trigger the update mechanism and see if there is a new version to install. That makes the deployment much easier.
Hope this helps!
Hi Patrice, do you mean something like make a little "custom DataLink", I understand.
The initial idea was getting the same DataLink to connect with a specific PI user.
Ah I see, I went a bit too far here! I'll reply your main question once more and give you another option.
1 of 1 people found this helpful
Recent versions of PI DataLink, and I believe this includes PI DataLink 2015, are running in their own separate application domain. This is done for security reasons and means that you cannot piggy bag on the PI DataLink connection. Just in case this is what you have in mind. Besides that Patrice Thivierge has provided a complete list of available options.
this was part of my doubt. I know DataLink connects through a different application domain, and I wanted to understand if it is possible getting that to connect using a specific user.
I understand I cannot force DataLink to connect with a speciifc user by code. Am I right? Can you confirm it, please?
After reading more on the exchange on this post I think I have another solution.
If understand well, you just need to have PI DataLink to connect the PI System ( AF and PI Data Archive) with a different user than the user that is logged on, correct?
In this case you can use the Windows Credential Managers to override the current user and connect the server(s) with other credentials.
This technique does not require any line of code, it only requires to configure User's windows profile so the credential manager contains the entries to connect to the appropriate server with the required username and password.
More details about the Credential Manager here:
I also had a chat with a college that told me you opened the case #745949 on this topic, I am mentioning it here for internal reference.
Please let me know if this solution works for you.
ps: you need to configure the same server name as you have configure in your PI AF SDK Connections. e.g. myserver.osisoft.com or myserver
wI suppose we could work with this solution. I added a question here as this is supposed to be the correct forum for code stuff...
Thanks for the help!
No problem Nicola it's alright!
Categories are just there to help and give some structure.
Conversations can become "snaky" and in the cases we just live with the selected category, not a big deal
Have a nice day and let us know if you run into any problem.