I haven't found a way to read a value for a job's extended property. I can get the record from the container, but how can I get the field index for the property name (I would prefer not to hardcode the index)? There is an interface IJTXAuxPropFieldInfoSet which seems to be made for this, but I can't find where it is implemented. I checked all types in ESRI.ArcGIS.JTX via reflection, but that interface seems to not be implemented anywhere. Or is there another way how to get at those property values? Do I have to open the AuxRecordContainer as an ITable? Here's the method I would like to implement. I'm using JTX 9.3.1 build 128.
private static int GetFieldIndex([NotNull] IJTXAuxRecordContainer recordContainer, [NotNull] string fieldName)
{
// invalid cast:
IJTXAuxPropFieldInfoSet fieldInfos = (IJTXAuxPropFieldInfoSet) recordContainer;
fieldInfos.Reset();
IJTXAuxPropFieldInfo fieldInfo = fieldInfos.Next();
int index = 0;
while (fieldInfo != null)
{
if (string.Equals(fieldName, fieldInfo.FieldName, StringComparison.OrdinalIgnoreCase))
{
return index;
}
fieldInfo = fieldInfos.Next();
index++;
}
return -1;
}