By Adam Nagy
There are multiple ways of dealing with moving and renaming Inventor documents and updating the references to them; so that all the relevant files can be found when your design is opened in Inventor.
Available in Inventor and Apprentice
This requires that the file originally referenced will have the same ancestry as the new file the reference is being changed to. So the files do not have to be exactly the same: the new file could be a modified version of the original.
Note: This does not seems to work well in all scenarios. E.g. in case of special assembly components like Cable & Harness assembly's part component, it won't work. Also, inside Apprentice you cannot save a file that needs migration (ApprenticeServerDocument.NeedsMigrating = true)
Available in Apprentice only
This functionality helps you change the name and path of a file and also updates all the references to it. Obviously, in this case the original file and the newly saved file will be exactly the same. Maybe that's why it's more robust and seems to work with any files.
The "Copy Design" sample of the Inventor SDK shows how to use it: "C:\Users\Public\Documents\Autodesk\Inventor 2016\SDK\UserTools\CopyDesign" (you have to install "usertools.msi" first)
Note: if the file needs migration (ApprenticeServerDocument.NeedsMigrating = true) then the FileSaveAs approach won't work. Also read Using Apprentice from VBA, iLogic or an Add-In
Available in Inventor only
If Inventor cannot find a file when your document is opened then it will pop up a "Resolve Link" dialog.
Its API equivalent is the call to the OnFileResolution event of the FileAccessEvents object. This event fires for all the files that Inventor needs, even if the referenced files were not moved or renamed. This also seems to work for all documents.