AnsweredAssumed Answered

How do I use AFSDK with VBA?

Question asked by DavidMFairchild on Jan 13, 2016
Latest reply on Mar 25, 2016 by jsoulis

I use Excel to do a lot of PI Server maintenance.  Particularly around PI Tags and Data.

 

I have PIBuffSS set up on my laptop to be able to edit archive data as required.  I use PI-SDK and it works great for copying data from one PI Tag to another or otherwise editing PI data.  But not for deleting values.  I would like to use AFSDK to do this and probably the other tasks as well.  I saw the nice bit of code from Rhys and also some in the AFSDK documentation, but I haven't been able to find out how I reference the AFSDK from an Excel VBA project.  I don't see any listing for AF anything in the Tools | References listing and if I browse to the Osifoft.AFSDK.dll in ..\PIPC\AF\PublicAssemblies I get the message: "Can't add a reference to the specified file.".

 

I also haven't been able to find an explanation on referencing these AF libraries in the AFSDK reference.

Outcomes