Renew thumbnails for Inventor

Renew thumbnails for Inventor

GeorgK
Advisor Advisor
1,496 Views
2 Replies
Message 1 of 3

Renew thumbnails for Inventor

GeorgK
Advisor
Advisor

Hello togehter,

 

how could I update the thumbnail in the file? The view should be isometric.

 

Thank you very much

 

Georg

0 Likes
Accepted solutions (1)
1,497 Views
2 Replies
Replies (2)
Message 2 of 3

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

When document is being saved, the new thumbnail will be generated with the current view. So you could just change the camera to the view you desired and call Document.Save.

 

Sub test()
    
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.activeDocument
    
    Dim view As view
    Set view = ThisApplication.ActiveView
    
    Dim camera As camera
    Set camera = view.camera
    
    camera.ViewOrientationType = kRightViewOrientation
    
    camera.Fit
    camera.Apply
    
    oDoc.SetThumbnailSaveOption kActiveWindowOnSave
    oDoc.Save
    
End Sub

 

 

 

or, you can create or change the thumbnail with the bimap you want: 

 

Public Function ChangeThumbnail(FullFileName As String) 

' Set a reference to the active document 
Dim odoc As Document 
Set odoc = ThisApplication.ActiveDocument 

' Get the "Summary Information" property set 
Dim oPropSet As propertySet 
Set oPropSet = odoc.propertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}") 

' Get the "Thumbnail" property 
Dim oProp As Property 
Set oProp = oPropSet.ItemByPropId(17) 

Dim oDisp As IPictureDisp 
Set oDisp = LoadPicture(FullFileName) 

' Set the value of the thumbnail file property 
oProp.value = oDisp 

' Save the document 
odoc.Save 

End Function 

 

Message 3 of 3

GeorgK
Advisor
Advisor

Thank you very much.

0 Likes