Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

VBA Excel Code for Repeated PI Compressed Data Extraction

$
0
0

I have searched the forums and google (I might just be bad at searching), but I can't seem to find anything on this. I am a bit of a newby to macros and VBA in general, and combining it with PI seems impossible for now.

 

What I am trying to accomplish is writing a VBA code that will run through a list of PI tags and pull "Compressed Data (Start Time/End Time)" for each tag. The code would read the tag name, start time, end time and change the preferences in the pop up menu (such as "hide count"). It would then extract the data to some point in the workbook for each tag. This is so that I don't need to go through the manual process of reselecting everything for each separate tag, which can be time consuming if you have a number of tags.

 

Ordinarily with a problem like this I would record a macro in Excel, select the options that I require, and then have a look at the resulting macro and figure out the process from there. But doing that in this case just results in 1 line of code "Application.Run "showCompDat"" which is not terribly helpful for me, because that just opens up the list, but I need to know how to manage the settings of the list itself.

 

An analogy is writing a macro to run several cases of Solver with different settings.


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>