Getting PIPoint attributes

Discussion created by eouseph on Nov 4, 2011
Latest reply on Nov 4, 2011 by eouseph



I am trying to get all the point attributes from a PI point. but all i get is the following four attributes only - descriptor, pointid, pointtype and tag. Could you point me in the right direction please? I am interested in the 'engunits' attribute. Thanks.


///Code snippet - start


 _PointListPtr piPointsList; 
 piPointsList = m_pServer->GetPoints(_com_util::ConvertStringToBSTR(filter.c_str()), NULL); 


 int count = piPointsList->Count;
 for (int i = 1; i <= count; ++i)
   _variant_t v = i;


   PIPointPtr point = piPointsList->Item[&v];
   _NamedValuesPtr nvsp(point->PointAttributes->GetAttributes());


   for (int j = 1; j <= nvsp->Count; ++j)
      _variant_t var = j;
      NamedValuePtr navp = nvsp->Item[&var];
      _bstr_t name = navp->Name;
      _variant_t value = navp->Value;


///Code snippet - end