Using the c# User API wrapper for Proficy Historian, how can I retrieve all (or a filtered list of) tag names?
I have located the method ihuFetchTagCache, which populates a cache returns a count of tags, but I cannot find a way to access this cache.
My code so far:
string servername = "testServer";
int handle;
ihuErrorCode result;
result = IHUAPI.ihuConnect(servername, "", "", out handle);
if (result != ihuErrorCode.OK)
{//...}
int count;
result = IHUAPI.ihuFetchTagCache(handle, txtFilter.Text, out count);
if (result != ihuErrorCode.OK)
{//...}
How do I read the tag name cache?
It is actually better to use the new tag cache methods provided in 4.5 and above. Here are the DLL import definitions I use.1
Then you can use the following code.
1Note that I do not use the provided DLL import definitions provided by GE so my code may look slightly different, but the differences should be mostly trivial.