I am not getting the PI tags to consistently write. I don't get an error, and I even have debug statements showing me that I'm in the section of code that should be writing the tag and the value that should be written. When I step through with the debugger, everything looks good so I can't tell what is wrong. I am using the SetValue as shown below:
element.Attributes(attributeName).Attributes("value").SetValue(New AFValue(pValue, pTimeStamp))
Any help would be appreciated.