Fix for Inventor Thumbnails running on 64 bit PCs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Largely due to the efforts of Mick Deck this fix is possible.
As stated in other threads 64 bit Inventor runs VBA as a sub 32 bit process. The iPictureDisp format of the document thumbnail cannot be accessed across this barrier.
The solution is to use VBA code to cause Inventor to fire an event that we can capture with an Add-in, Inside the event we convert the thumbnail data into string data and pass it back to VBA where it is reconstitued into a stdPicture object for our use.
The Windows clipboard is used for input and output to the add-in event process.
Attached is the VB.NET project to create the add-in dll.
The standard version of VB.NET 2010 was used to create this project. If you are using VB.NET 2010 express then you will have to use Notepad to open and copy the relavent code to your express project.
If you do not need the source code then the compiled dll is under the ThumbNailFix64Bit\ThumbNailFix64Bit\bin\Release Folder in the project folders. Likewise the Autodesk.ThumbNailFix64Bit.Inventor.addin file is located under the ThumbNailFix64Bit\ThumbNailFix64Bit project folder.
As I was working with Inventor 2011 that is the version this fix addresses. If you are using 2012 then you will have to change the Inventor.Interop file to point to 2012 and recompile.
Copy the dll to your Autodesk\Inventor 2011 bin folder and the .addin file to your 2011 Addin folder.
Make sure the addin shows up in inventor when inventor is opened. Make sure the Load/Unload checkbox is checked.
Open your VBA edtor and create a new Module. I name mine bas_64bit _tools. Paste the text from the attached text file into the module. Call the Get64BitPicture(() function from anywhere inside your VBA project.
For use on both 32 bit and 64 workstations I use the the following snippet..
Set oDoc = ThisApplication.Documents.ItemByName(Path)
If ThisApplication.SoftwareVersion.Is64BitVersion Then
Set Pic1.Picture = Get64BitPicture(oDoc.FullFileName)
Else
Set Pic1.Picture = oDoc.Thumbnail
End If