πŸ“„ Auto Open Drawing from Inventor Part/Assembly

πŸ›‘ Problem: Manually Hunting for Associated Drawings

When working on a part or assembly in Autodesk Inventor, finding the matching drawing file can turn into a repetitive, time-wasting search across folders and subfolders.

Every time you need to review or update a drawing, you end up browsing directories, guessing names, and opening multiple files until you finally land on the right one.

This macro removes that friction by automatically opening the associated drawing file for the active model, so you stay focused on design instead of file management.


πŸ” What This Macro Does

This VBA macro searches for and opens the drawing file (.idw or .dwg) that matches the currently active Part (.ipt) or Assembly (.iam) file in Inventor.

It looks for drawings with the same base file name and opens the correct one instantly when found.

πŸ“ Where It Searches

  • The same folder as the active part or assembly
  • All subfolders, up to 5 levels deep, so you can keep organized structures without losing quick access

If a matching drawing is found, it opens directly in Inventor and is ready for review or editing.


πŸŽ₯ Demo: See It in Action

πŸ‘‡ Here’s what the macro does with just one click:

Automatically open the associated drawing for the active Inventor part or assembly.


βœ… Requirements

To use this macro smoothly, make sure:

  • You are running Autodesk Inventor 2015 or later
  • VBA support is available and enabled on your Windows machine
  • The drawing file uses the same name as the part or assembly
    • Example: Bracket.ipt β†’ Bracket.idw or Bracket.dwg

🧩 Included Files

Included Files
File NamePurpose
OpenAssociatedDrawing.bas The macro module to import
README.md User guide in Markdown format

These files come together as a small, focused tool you can plug into your existing automation toolbox.


πŸš€ How to Use the Macro

1. Open Inventor

Start Autodesk Inventor and open any part (.ipt) or assembly (.iam) file that you want to work with.

2. Launch the VBA Editor

Press Alt + F11 to open the built-in VBA Editor inside Inventor.

3. Import the Macro

  • Go to File β†’ Import File…
  • Select OpenAssociatedDrawing.bas
  • The module will appear in your Inventor VBA project tree

4. Run the Macro

  • Close or minimize the VBA editor
  • Press Alt + F8, select OpenAssociatedDrawing, and click Run

If a matching drawing exists, it will open automatically.


πŸ’‘ What the Macro Does Internally

Under the hood, the macro performs a series of checks and searches to find the right drawing:

  • Confirms there is an active document and that it is a part (.ipt) or assembly (.iam)
  • Verifies that the active file is saved, so a folder path is available
  • Builds the expected drawing names (.idw and .dwg) based on the active file name
  • Scans the working folder and subfolders (up to 5 levels) using a breadth-first search strategy
  • Opens the first matching drawing found, or shows an informative message if none exist

⚠️ Possible Error Messages

If something is not set up correctly, you may see one of these messages:

⚠️ Possible Error Messages
MessageCause
No document is open. Inventor has no document open
Open a Part (.ipt) or Assembly (.iam) file first. The active document is not a part/assembly
Save the file before running the macro. The active file has not been saved yet
No drawing file found in folder or subfolders. No matching .idw or .dwg was found

These checks help prevent confusion and guide you toward fixing the underlying issue quickly.


πŸ“ˆ Performance Characteristics

The search is designed to be both robust and efficient:

  • Uses a breadth-first search approach to avoid deep recursion and excessive memory usage
  • Limits the search depth to 5 folder levels to keep lookups fast and predictable

This makes the macro safe to use even on large, structured project folders.


πŸ’Ό Tips for Power Users

You can get even more out of this macro by following a few best practices:

  • Keep associated drawings in the same folder or in well-structured subfolders near the model files
  • Use consistent, matching filenames between parts/assemblies and drawings
  • Extend the macro to integrate with:
    • Autodesk Vault search
    • Logging or telemetry
    • Automatic drawing creation when no drawing is found

πŸ“¦ Download the Macro

You can download the ready-to-use .bas module here:

πŸ‘‰ Download OpenAssociatedDrawing.bas

Import it into Inventor’s VBA environment and you’re ready to go.


🌍 Multilingual Documentation

The download package includes README guides in multiple languages so teams across regions can adopt the macro easily:

  • English
  • German
  • Chinese
  • Japanese

Each language-specific README explains setup and usage so everyone can get started quickly.


πŸ“¬ Need Help or Have Ideas?

If you have questions, feature requests, or improvement ideas:

  • Leave a comment on the article page
  • Or reach out directly via the contact email linked on the site

Feedback helps shape future automation tools and enhancements.


πŸ”’ License

This macro is provided as-is, without warranty.

You are free to adapt, modify, and redistribute it for internal use or client projects as part of your automation workflows.


✨ Happy Automating!