Hi William! Thank you for your answer and the snippet! This might work for our case too, and I will try it right away.
Actually, yes I did. Unfortunately, it does require using the geoprocessor since ArcObjects still doesn't have a way to read this information. But using the Geoprocessor and the IDEEditorTracking interface will give you the current edit tracking configuration information. Here's a snippet that should give you the info on a specific feature class.
Debug.Print("Name, Enabled, CreatedAtFieldName, CreatorFieldName, EditedAtFieldName, EditorFieldName"); string ClassPath = @D:\Data\Test.gdb\FeatClass; object DataType = ""; IDataElement DataElement = GP.GetDataElement(ClassPath, ref DataType); IDEEditorTracking DeEditTrack = (IDEEditorTracking)DataElement; if (DeEditTrack.EditorTrackingEnabled) { Debug.Print("{0}, true, {1}, {2}, {3}, {4}", ClassPath, DeEditTrack.CreatedAtFieldName, DeEditTrack.CreatorFieldName, DeEditTrack.EditedAtFieldName, DeEditTrack.EditorFieldName); } else { Debug.Print("{0}, false", ClassPath); }
Have you ever found a solution for this? We're currently facing a similar problem.
Just wanted to add that I was looking for this same info. I want to report out what features classes have edit tracking set and with what values. It would appear that there is no way to get at this information. Or at least not a documented way in ArcObjects. The IDataObjectTable2 interface appears to be coming from ArcServer and sounds like it may have been dropped as of 10.1. And as mentioned IDEEditorTracking is for geoprocessing. Why is this not available? We're given a method to set these values but not read them. Ug.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.