I wrote a VB.NET application leveraging the AFSDK. The first thing the application does is prompt the user to input some information, which is used to build an AF element path (e.g., "Station/Unit"). This path is then used to retrieve snapshot values from PI Point Data Reference AF attributes residing at that path. I have already added some data validation steps to verify the inputs received from the user. I would additionally like to add a check to verify that the referenced AF element path actually exists. I am familiar with the AFElement.FindElements and AFElement.FindElementByPath methods, but have not figured out a good way to use them to validate that the full specified path exists. Could anyone provide a piece of sample code around how to validate the existence of an element path?
Thanks in advance!