Hi @DonStauffer99. The 'Documents.Open' method can certainly be complex to understand fully. It can be used to 'visibly' show a document that is already open invisibly, such as the documents that get automatically initialized (invisibly, partially loaded into Inventor's session memory) when you open things like drawings or assemblies in Inventor. If you have Inventor's status bar visible, you will usually see those numbers at the right end of that status bar...one representing the number of 'occurrences', while the other represents the total number of 'open' documents (both visible & not visible). But it can also be used to initially open a file, which creates the Document by loading the data from the file into Inventor's session memory, which can either be done visibly, or invisibly. If a document is opened invisibly, we can also make it visible by adding an 'Inventor.View' to Inventor for that document, though the Document.Views.Add method, because its Document.Views.Count property will be zero before that. If a file was directly and invisibly opened to create a Document, and nothing else is referencing that document, then we can just use its ReleaseReference method when done with it, instead of its Close method, because there are no Views to close. If we close the only View of a Document, and there are no other references to that Document, then that action will also usually close that document, and release Inventor's reference to it. After all views and references have been eliminated for a Document, Inventor's built-in 'trash collector' will clear it from Inventor's memory at some point soon after, freeing up that space in memory. So, the Open method can almost be thought of similar to the Add method, as far as the Documents collection is concerned, when opening directly from a File, and not through any 'referenced files/documents' of some other open document, because it does not already exist within the Documents collection yet. There is a similar situation with the FileManager.Files property, that sounds like a paradox, because how can Inventor's FileManager possibly know about every Inventor 'File' in your whole file system...where it likely means only the 'Files' that are associated with some of the Documents that are currently open/loaded in Inventor's session memory that have either been saved, or opened from an existing file (not New documents, because no File yet).
Closing documents is probably even more complicated, because sometimes doing so will just eliminate any 'Views' of that Document, without wiping that Document out of Inventor's session memory, or can leave it invisibly open. It all depends on how and why the document was initially opened, and if any other open documents are still referencing it in any way, or if any code-based resources still have a reference to it.
Wesley Crihfield

(Not an Autodesk Employee)