To help explain that, I think I should probably explain that there is also an Inventor.File object. The File object is a specifically organized collection of data that has already been written to something like a hard drive or other long term data storage medium. The Inventor.Document object is a specifically organized collection of data that is currently being held within Inventor's temporary 'session memory', which is a portion of your computer's RAM that Inventor is using while it is running. A Document can exist without being associated with a File, and a File can exist without being associated with a Document. For example, when we click on the 'New' button in Inventor, that creates a new Document. You can then start designing something within that document, but there will not be a File for that document until you 'Save' it. But you could have also just closed the document, without ever saving it, then there would have never been a File created for it. When you save a Document for the first time, that creates a File that will then be associated with that Document, as long as that Document remains open in Inventor. If you continued to make changes to that Document after saving it, then the contents of the File would be different from the contents of the Document, so if you closed that document without saving again, those changes made since the last save would be lost, because they would not get written into the File. This is because the document is just temporary. When you use Inventor to 'Open' an Inventor file, Inventor creates a Document to represent the data to the user in a way that the user can recognize and interact with.
Traditionally, it seemed like there has always been just one Document per open file, but with the introduction of ModelStates in the 2022 release of Inventor, it seems like one file can now store the necessary data for defining either just one document, or many documents, because each ModelState can potentially represent a different document that is based on a different set of data. Each ModelState can potentially have different values for the same Parameters and iProperties, and can potentially have different components &/or features suppressed or unsuppressed. So, each ModelState can potentially represent a model that is very different in size, shape, and information. Not only that, but we can potentially place many assembly components into an assembly, where each of them reference the same source file, but each one can be set to a different ModelState that was defined in that source file, which can generate many different documents (one for each different ModelState that the components are set to), all pointing back to that one source file. In situations like that, making changes to those documents by code can get pretty complicated.
Next, we need to be aware of the difference between 'member' documents, and the 'factory' document, when ModelStates are involved. When you have a file open in Inventor which has multiple ModelStates in it, the document associated with the 'active' ModelState is understood as the 'factory' document, and the documents associated with the 'other' (not active) ModelStates are known as 'member' documents. Usually, we will be able to (Read/Write) freely make changes to the factory document, but the member documents will be (ReadOnly) readable, but not changeable. There are exceptions, but that is where some of the complexity comes in. One of the exceptions is what is called the 'edit scope'. This edit scope dictates whether our current and near future changes made to the active document will only effect the active ModelState, or will effect (multiple or all) ModelStates. Manually, that edit scope an be accessed/changed on the Manage tab of the ribbon, on the Author panel, where there is a drop-down control for it, or from the ModelStates nodes in the model browser tree, where will be small indicator controls next to each ModelState. Another exception is where we have the ability to edit the contents of the ModelState table, or editing it through an Excel spreadsheet, where those edits can effect multiple ModelStates at the same time.
Whew. 😅
Wesley Crihfield

(Not an Autodesk Employee)