AnsweredAssumed Answered

PI function not accepting arrays in Excel VBA

Question asked by JohannesVeje on Aug 15, 2016
Latest reply on Aug 15, 2016 by JohannesVeje

Hello all

 

I recently started working on retrieving PI data using Excel VBA, and I need to retrieve an array of data. According to the PI SDK documentation I should be able to use piar_compvalues (https://techsupport.osisoft.com/Documentation/PI-SDK/PI-API/Functions/piar_compvalues.htm), however when I pass the array of times I get argument type mismatch error. When I try to pass only a single time it works, but any array no matter how they are initialised results in the same error.

 

The reason I want to look up by array is to reduces the number of lookup and there by the time needed to run the code. Or that is at least my idea.

Outcomes