AnsweredAssumed Answered

Check PI Point based on AF Attribute Error

Question asked by alexbarata on Dec 18, 2018
Latest reply on Dec 20, 2018 by alexbarata

Hi all,

I'm getting an error when trying to get the name the PI Point of an Attribute or when trying to update the PI Point for that attribute, using this function: AssetElement.Attributes[AttributeName].DataReference.CreateConfig();.

The unusual is that this only happens when running the code on the PI AF Server, when debugging the code on my computer I don't get any issue.

Below is the error:

OSIsoft.AF.PI.PIPointInvalidException: [-12002] Code Not Found in PInt

   at OSIsoft.AF.PI.PIException.ConvertAndThrowException(PIServer piServer, Exception ex, String message)

   at OSIsoft.AF.PI.PIException.ConvertAndThrowExceptionFromGetAttributeCalls(PIServer piServer, Exception ex, String idOrName)

   at OSIsoft.AF.PI.PIPoint.get_Name()

   at OSIsoft.AF.Asset.DataReference.PIPointDR.CreateConfig()

   at XXXXXX.ValidationCheck.CheckPIPoint(AFElement AssetElement, String AttributeName, String OverallFilePath, String CategoryFilter, Boolean BlockChange)

 

I already checked and the IDs of the PI Point in SMT and SE matches.

Any suggestion how to workaround this?

Thanks and regards,

Alex.

Outcomes