API Help
Eplan.EplApi.DataModel Namespace / PropertyValue Class / LastUsedIndex Property
Example

LastUsedIndex Property (PropertyValue)
Returns number of highest used index. Indexes start from 1. If it wasn't a indexed-property or there is no used index, LastUsedIndex is 0; Object of PropertyValue had to point to property from project not to individual value.
Syntax
public int LastUsedIndex {get;}
Exceptions
ExceptionDescription
Thrown when property wasn't an indexed\-property.
Example
PropertyValue oProperty = m_oTestProject.Pages[0].Functions[0].Properties[ FUNC_INDEXED_PROPERTY ];
if(oProperty.IsIndexed)
{
  for ( int i = oProperty.LastUsedIndex ; i \>= 1 ; --i )
  {
      PropertyValue oPropertyElement = oProperty[ i ];
      string sProperty = oPropertyElement.ToString();
  }
}
See Also