Thumbnails from BOM

Thumbnails from BOM

pavol_krasnansky
Enthusiast Enthusiast
637 Views
3 Replies
Message 1 of 4

Thumbnails from BOM

pavol_krasnansky
Enthusiast
Enthusiast

Hi
I created Inventor Plug-in (in the Attachment). Plug-in loads BOM in an assembly and it writes in to the table / datgridview. Loading thumbnail of models does't work correct. Some thumbnails are lost (screenshot below). I don't know why. Do samebody know where the problem is?
Thank you

 

Thumbnails_from_BOM.png

Accepted solutions (1)
638 Views
3 Replies
Replies (3)
Message 2 of 4

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

This could be a known error getting thumbnail. Replace your line

oThumbnail = doc.Thumbnail

with

Do
  oThumbnail = doc.Thumbnail
Loop While oThumbnail.Handle<0

R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 3 of 4

pavol_krasnansky
Enthusiast
Enthusiast

Thank you very much! It works. But I don't know why 🙂

0 Likes
Message 4 of 4

Ralf_Krieg
Advisor
Advisor

Hello

 

As stated in this Blogpost, sometimes the returned IPictureDisp.Handle is negative. This will cause the error when trying to convert to image.

 


R. Krieg
RKW Solutions
www.rkw-solutions.com