Update to Thumbnail Parts List

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.


Comments

One response to “Update to Thumbnail Parts List”

  1. Peter Brown Avatar
    Peter Brown

    Thanks for the clarification, but one further point-
    IV2010 currently has VBA for macro’s is this OK for machines running the 64 bit version as well as the 32 bit version?

Leave a Reply to Peter BrownCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading