Anwar005

Extract PI Tag from AF attribute

Discussion created by Anwar005 on Jan 8, 2013
Latest reply on Jan 8, 2013 by MIPAC

Hi,

 

I want to extract PI tag Name from AF attribute. I have used below code. But attribute.RawPIPointPath(AFEncodeType.Name) return null always. Does anybody have sample code/project?

 

My config string for PI point attribute will be one of below strings

  • \\MUS-AS-111\FAH.F013.CHP;UOM=bar
  • \\MUS-AS-111\FAH.F013.THP
  • \\MUS-AS-111\AN.Gross_Production;ReadOnly=False

Here is the code which I tried to implement. 

 

string name = attribute.RawPIPointPath(AFEncodeType.Name);
srcUOM = "";
if (name != null)
{
int index = name.LastIndexOf("\\");
if (index >= 0)
name = name.Substring(index + 1);

 

srcUOM = attribute.DataReference.UOM.Abbreviation;
}

 

 

 

Please suggest a solution for this problem?

 

 

 

Regards,

 

Anwar

Outcomes