Mass file renaming and relinking in Inventor Part I: The results

*Edit: New, translated, version posted on GitHub with install instructions. Check it out at


1. Introduction

If you’re a mechanical designer for a living, chances are that you already had to copy an existing design. Even higher are the chances that you already had to rename all the files in a given assembly to match an ERP needs or a coding system needs.

Well, there are many ways of doing this, but I found that all the built-in ways in Autodesk Inventor have some sort of caveat:

  • Manual renaming in explorer: This is a pain in the ***. Apart from renaming the files one by one, you have to keep track of the old-new name correlations so when you open the assemblies in Inventor, you can redo the links manually.
  • Excel VBA to rename files: This is a little bit less cumbersome. You relieve the pain of renaming the files one by one, but the relinking still needs to be done manually in Inventor. At least you can print the correlation table from Excel.
  • Using the Design Assistant: This tool is nice, but there is a missing functionality that keeps it from being something usable for large assemblies: One cannot paste a table in the treeview. Imagine you as a designer already having the old-new naming correlations in an Excel table, but unable to paste them in Design Assistant. You still have to do the renaming manually. Sometimes it hurts productivity even more as the files are organized according to the tree, so finding them is another issue.
  • Using the CopyDesign add-in sample from Inventor SDK: This is an example piece of software that comes with the Inventor API SDK. It does what it’s supposed to do: Copies a design and renames the files. The problem is, you need to have the new names beforehand. And new files (which are probably going to happen in a copied design) will have to be named correctly during design, which is not always possible under an ERP system.

2. My solution

So, now that I showed the available options and how they did not meet my needs, let me state what I want to do and what I came up with using the Inventor API.

I want to make a file list using Excel VBA (which will list the file names for the current assembly) and, using some made-up rule, assign new names to the existing files. Here I think Excel will always be way more flexible than any piece of software I would ever write, so I decided to leave the rule creation to the freedom of the user. A table like the one shown below will be the output from Excel as a CSV file and read by this program:

Input CSV file format for the renaming system

I open the main assembly file and import the correlation table on my API-brew software. It figures out what files need to be renamed if they match the name in the “from” column of the correlation table. It finds out whether there are any equally-named *.idw files in the path. It renames all the files and then redoes the links in all levels of the assembly. Finally, it saves the assembly.

That’s the procedure in a nutshell. The heavy work is done by the software. So how does it look in Inventor? Follow the step-by-step screenshots shown below.

2.1. Main assembly loaded in my API interface

***Edit: I changed the button name to “Batch Renaming“.

Screen of the “Batch Renaming” add-in showing the list of components referenced by the assembly

2.2. Loading the CSV file

CSV file being selected in the file browser

2.3. Correspondences loaded in the file being displayed on-screen

In this case, not all files were selected to be renamed as some parts belong to the library.

Files to be renamed are shown in the table in bold

2.4. Renamed files in Explorer

Files after the renaming in the explorer view…


… and in the Inventor treeview!

3. Conclusion

So the use of this tool saved us quite a lot of time on the renaming of files. For larger assemblies, of >700 parts, a reliable manual renaming took up to 3-4 hours and could be reduced to something like 10 minutes. If you think this tool might be useful for you too, please let me know in the comments!

I published it on GitHub in this address: Please check it out and let me know if it was useful for your job!

If you guys understand Portuguese, you might find this video I made in my language for my comrades useful. I’ll soon produce an English version with the updated code so more audience can understand it. **EDIT: there it is =)

**Edit 2: Watch the installation process if you’re having trouble:

12 thoughts on “Mass file renaming and relinking in Inventor Part I: The results

  1. I really don’t know how to thank you! I looked for something that was renamed en masse for years, finally I found your job and it changed my life! I had tried to do it with iLogic but without success. I am a mechanical designer, if I can do something for you I would be happy! Thank you again


  2. Frenando,
    Thanx for making an excellent program!
    I tried using it on my Inventor 2010 Suite.
    Obviously the Excel file worked, and so did the VBA.
    Only it would not recognize/see my Inventor files (they didn’t show up on in the Existing Files list).
    Is there something I do do to make it see my older Inventor files?
    Cheers! … Chris


    1. Hi, cadman777, as far as I understood from your description you didn’t attempt to install the program. The excel file is simply for generating a table of correspondences. Try following these instructions:


  3. Great job, and i had tried run on Inventor version 2020. But anyway is it possible to export the unfold flat pattern at the same time with multi sheet in IDW file?


  4. Great Job!! I was wondering if there is a workaround not to rename, but to replace files from an excel list: I have thousands of files that were only renamed and relocated to another folder. Thank you


    1. Hi, genisuk, I don’t think that can be done under the current implementation. You can try to have a relative path in the file (instead of ‘file.ipt’; use ‘/Folder/file.ipt’). I’m not sure that will work, though, and I can’t really test it right now.


  5. Hello Fernando!
    I’ve been using this add-in since you gave it to me in 2017. The inventor development team hasn’t offered a renaming solution as it was then. There may be nothing beyond your solution. Thank you for your add-in.

    I recently updated to the latest version 2022 of Inventor.
    However, this add-in does not load. It cannot be confirmed from the add-in manager, and of course the command button is not placed. I already know how to use it, so I checked the registry registration and file placement, but there seems to be no problem. From 2017 to 2021, it worked fine.
    Do you have any advice?



  6. Hello Fernando!
    Thank you for your reply.
    please do not worry.
    I pray for the success of your new challenge.
    As always, it may be a bug in the new version.
    Look for other solutions while watching for bug fixes.
    Thank you.



  7. Hi Fernando, and all the users of this great add-in.
    A solution for the loading error in Inventor 2022 has been found.
    After all, in Inventor 2022, it has been changed to the specification for loading only registry-free type.
    The solution is as follows.
    HKEY_CURRENT_USER \ SOFTWARE \ Autodesk \ Inventor \ RegistryVersion26.0 \ System \ Preferences
    > Add DWARD value
    LoadRegisterBasedAddins “= dword: 00000001
    I hope this information will be useful to everyone !


    Liked by 1 person

    1. Oh, wow, thanks Yoshinori! I can’t reproduce the issue because I don’t have Inventor 2022, but it’s good to know there’s a way. I’ll update the Readme in the Github repo, then. Thanks for your help!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s