AlistairFrith

AF automation in ProcessBook

Discussion created by AlistairFrith on Feb 17, 2011
Latest reply on Feb 18, 2011 by Ahmad Fattahi

I am embarking on a large project, the first stage of which is to get some quick value out of an existing PI system. It needs an asset hierarchy and I intend to use AF rather than the MDB, for all the normal reasons and also since the following stages will use it and I don't want to re-invent the wheel.

 

For the first stage though, I am not supposed to extend the core functionality of the PI applications (partly for political / contractual reasons) and I take that to mean VBA at most and no .NET addins,

 

I have discovered that there is no VBA access to the AF SDK but I need to do things like listing all the children of the current context element. I have seen the "AF SDK in Excel" thread and also had an email conversation with Clint Ramsey and I can think of a number of options:

  • Use OLEDB to talk to AF, as mentioned in the "AF SDK in Excel" thread but I have never done this before and am a little daunted by it.
  • Write a .NET addin to expose the functionality I need to VBA but that demands the addin be installed on client machines and goes beyond the remit of the first phase. However, I will have to do some .NET addins for the next phases so maybe I should bite the bullet and get started. Clint has provided an example addin.
  • Scrap AF and use the MDB for phase 1 but then we have all the disadvantages
  • Use AF but synchronise it with the MDB and access that from PB. But they don't have PI2010, only 3.4.380 and AF. Can we synchronise?
  • Something else?

I keeping changing my mind over which of the above options to use! Can anybody provide any suggestions, advice or pointers on this? It is really frustrating that AF can't be accessed programatically from VBA.

 

--- Alistair.

 

 

Outcomes