By Adam Nagy
When you create a new document then a new GUID will be assigned to its InternalName property. This will stay the same for the lifetime of the document no matter what modifications have been done in the document geometry or file properties. This property also remains the same when the file gets copied or renamed. So how to tell the difference between two copied documents once they got modified?
You can use the RevisionId and DatabaseRevisionId property for that depending on what kind of differences you are interested in:
RevisionId
Gets the GUID that represents the last saved revision of this file. Works as a stamp of the contents of this file.
DatabaseRevisionId
Gets the GUID that represents the last saved revision of database contained in this document. This revision id tracks modifications to the database (such as reference changes, geometry changes, etc.) but does not track file property changes.
If two documents have the same InternalName, then they were originally the same file but could have been modified in the meantime.
If their DatabaseRevisionId is the same, then their geometry and references are the same.
If their RevisionId is the same, then everything in the two files are the same.