I’ve re-written the utility to create a parts list with the thumbnail image. I’ve updated the original post with the new program. The new program is an add-in instead of a VBA macro.
For those of you interested, the problem on 64-bit machines was a side effect of a limitation of COM Automation. COM Automation is the underlying Microsoft technology that Inventor’s API is based on. A limitation it has is that you can’t pass a bitmap between processes. When the macro is running on a 32-bit machine, VBA is running in the same process as Inventor so when the API call is made to get the thumbnail image Inventor is able to pass it back to VBA. VBA doesn’t have 64-bit support so in order to still provide VBA capabilities with 64-bit Inventor, VBA is run using a separate 32-bit process. When the API call is made to get the thumbnail it fails because it can’t pass the bitmap between the Inventor process and the process hosting VBA. Rewriting this as an add-in solves the problem because it can be 64-bit and so it can run within Inventor’s process.

Leave a Reply to Peter BrownCancel reply