๐ Auto Open Drawing from Inventor Part/Assembly
Want to instantly open the drawing file related to the part or assembly youโre working on in Autodesk Inventor? This free VBA macro does exactly that โ saving time and streamlining your workflow.
๐ What It Does
This macro automatically looks for and opens the associated drawing file (.idw
or .dwg
) for the currently active Part
(.ipt
) or Assembly
(.iam
) file.
๐ Where It Searches
- The same folder as the open file
- All subfolders, up to 5 levels deep
If it finds a match (by file name), the drawing opens instantly in Inventor.
๐ฅ Demo: See It in Action
๐ Hereโs what the macro does with just one click:
โ Requirements
- Autodesk Inventor 2015 or later
- Windows with VBA support
- The drawing file must have the same name as the part or assembly
(e.g.,Bracket.ipt
โBracket.idw
orBracket.dwg
)
๐งฉ Included Files
File Name | Purpose |
---|---|
OpenAssociatedDrawing.bas |
The macro module to import |
README.md |
User guide in Markdown format |
๐ How to Use
1. Open Inventor
Start Inventor and open any .ipt
or
.iam
file.
2. Launch the VBA Editor
Press Alt + F11
to open the VBA
Editor.
3. Import the Macro
- Go to
File โ Import Fileโฆ
- Select
OpenAssociatedDrawing.bas
4. Run the Macro
- Close the VBA editor
- Press
Alt + F8
, chooseOpenAssociatedDrawing
, then click Run
๐ก What the Macro Does Internally
- Checks for an active
.ipt
or.iam
file - Verifies the file is saved
- Scans for
.idw
or.dwg
with the same name - Searches subfolders, using breadth-first strategy
- Opens the drawing if found, or shows an error message if not
โ ๏ธ Possible Error Messages
Message | Cause |
---|---|
No document is open. |
Inventor has no file open |
Open a Part (.ipt) or Assembly (.iam) file first.
|
Macro works only with .ipt and
.iam |
Save the file before running the macro.
|
Unsaved files canโt be located |
No drawing file found in folder or subfolders.
|
Matching drawing file not found |
๐ Performance
- Uses breadth-first search to avoid excessive memory use
- Limited to 5 folder levels for speed and reliability
๐ผ Use It Like a Pro
- Keep drawings in the same folder as models, or inside logical subfolders
- Ensure filenames match exactly โ including case and extension
- Extend this macro to include:
- Autodesk Vault search
- Logging
- Automatic drawing creation (if not found)
๐ฆ Download the Macro
๐ Click here to download the macro (OpenAssociatedDrawing.bas)
(Make sure to subscribe if download is gated)
๐ Multilingual Support
This macro package includes README guides in multiple languages:
- ๐ฌ๐ง English
- ๐ฉ๐ช German
- ๐จ๐ณ Chinese
- ๐ฏ๐ต Japanese
๐ Youโll find the README guides inside the download folder to help users across different regions easily understand and use the macro.
๐ฌ Need Help?
If you have questions or want to suggest improvements:
- ๐ Leave a comment below
- ๐ง Reach out via the Contact page
๐ License
This macro is provided as-is, without any warranty. You may freely modify and redistribute it for internal or client use.
โจ Happy Automating!