I would like to get the PI Digital state sets, but I am not sure how to do this in the AFSDK. I attempted to use this but it continues to return 0 items. I was able to get the set using the PISDK but I do not want to add the PISDK to my project if I do not need to

AFEnumerationSet.FindEnumerationSets(mAFDB, stateName, AFSearchField.Name, AFSortField.Name, AFSortOrder.Ascending, 10).FirstOrDefault()

After finding the digital state set I just need to iterate through all of it's states and get a list of the state names.

If you want to find a PI Data Historian digital state set you might want to try code similar to:

Let us know if you have any questions.