✨ Rename Drawing to Match Model in Inventor — Save Time & Stay Organized!
If you’ve ever found yourself opening a drawing in Autodesk Inventor and wondering “Which part or assembly is this drawing for?”, you’re not alone.
🔄 Keeping drawing file names in sync with their model names is one of the simplest ways to stay organized — yet it’s something that gets missed far too often.
That’s exactly why I built this free macro:
🎯 RenameDrawingToMatchModel — a tiny but powerful Inventor VBA macro that
automatically renames your drawing to match the name of the first model it references.
🚀 What This Macro Does
- ✅ Detects the first referenced
.ipt
or.iam
file in your open drawing - ✏️ Renames the drawing (
.idw
or.dwg
) to match the model’s file name - 💾 Creates a safe backup copy before renaming
- 🔄 Reopens the renamed drawing in Inventor
- ⚠️ Prompts you if a file with the new name already exists
📂 Why This Is Useful
- Keeps file names consistent between drawings and models
- Makes file navigation and version control easier
- Reduces chances of mistakes during file sharing or release
- Great for teams who need to enforce naming conventions
- Helps new users understand what’s inside a drawing — instantly
📸 Real Example
Let’s say you’re working with these files:
-
Model: C:\Projects\Brackets\Bracket01.ipt
-
Drawing: C:\Projects\Brackets\SidePlate.idw
After running the macro, the drawing will be renamed to:
And the original SidePlate.idw
will be
backed up safely in:
- C:\Projects\Brackets\Backup\SidePlate.idw
✨ Clean, safe, and fast.
⚙️ How to Use the Macro
- Open your drawing in Autodesk Inventor
- Press
Alt + F11
to launch the VBA editor - Import the macro file:
RenameDrawingToMatchModel.bas
- Press
Alt + F8
, selectRenameDrawingToMatchModel
, and hit Run
🔄 The drawing is renamed and reopened automatically!
🧩 Requirements
- Autodesk Inventor 2015 or newer
- Windows with VBA support
- The drawing must be saved and reference at least one model
💬 Common Errors & How to Fix Them
Error Message | Solution |
---|---|
Open a drawing document first.
|
Make sure a drawing is open |
Save the drawing before renaming. |
Save the drawing file first |
No model referenced in the drawing.
|
Insert a reference to a part or assembly |
Rename failed: ... |
Check if the new file is already open or locked |
📦 Download the Macro
You can grab the .bas
file and detailed
instructions in our Macro Library.
🌍 Available in Multiple Languages
- 🇬🇧 English
- 🇩🇪 Deutsch
- 🇨🇳 中文
- 🇯🇵 日本語
Perfect for international teams!
🙌 Final Thoughts
This macro is small — but mighty. If your Inventor folders are filled with mismatched filenames, this tool can bring instant order to the chaos.
🔐 As always, the macro is provided as-is, but you’re welcome to modify and use it in your projects or client work.
✉️ Need Help or Want Custom Macros?
I love building practical, real-world Inventor tools for engineers and designers.
💬 Reach out via prashantbaher@thecadcoder.com
or visit:
Happy automating! 🛠️