[CommandMethod("FDM")]
public void FDM()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
if (doc == null) return;
Editor ed = doc.Editor;
Database db = doc.Database;
using (FileDependencyManager fdm = db.FileDependencyManager)
{
fdm.IteratorInitialize(null, true, false, true);
int index = fdm.IteratorNext;
if (index == 0)
ed.WriteMessage("\nНет обновлений!");
else
ed.WriteMessage("\nОбновлений: {0}", index);
while (index > 0)
{
FileDependencyInfo fdi = fdm.GetEntry(index, true);
ed.WriteMessage("\n");
ed.WriteMessage("\n{0}", fdi.FileName);
ed.WriteMessage("\n{0} {1}: {2}", "----", "Feature", fdi.Feature);
ed.WriteMessage("\n{0} {1}: {2}", "----", "FileSize", fdi.FileSize);
ed.WriteMessage("\n{0} {1}: {2}", "----", "FingerprintGuid", fdi.FingerprintGuid);
ed.WriteMessage("\n{0} {1}: {2}", "----", "FoundPath", fdi.FoundPath);
ed.WriteMessage("\n{0} {1}: {2}", "----", "FullFileName", fdi.FullFileName);
ed.WriteMessage("\n{0} {1}: {2}", "----", "Index", fdi.Index);
ed.WriteMessage("\n{0} {1}: {2}", "----", "IsAffectsGraphics", fdi.IsAffectsGraphics);
ed.WriteMessage("\n{0} {1}: {2}", "----", "IsModified", fdi.IsModified); // <- Модифицирован или нет?
ed.WriteMessage("\n{0} {1}: {2}", "----", "ReferenceCount", fdi.ReferenceCount);
ed.WriteMessage("\n{0} {1}: {2}", "----", "TimeStamp", fdi.TimeStamp);
ed.WriteMessage("\n{0} {1}: {2}", "----", "VersionGuid", fdi.VersionGuid);
ed.WriteMessage("\n");
fdm.UpdateEntry(index);
index = fdm.IteratorNext;
ed.WriteMessage("\n{0}", index);
}
}
}