Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Renew thumbnails for Inventor

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
GeorgK
1190 Views, 2 Replies

Renew thumbnails for Inventor

Hello togehter,

 

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

 

Thank you very much

 

Georg

2 REPLIES 2
Message 2 of 3
xiaodong_liang
in reply to: GeorgK

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
in reply to: xiaodong_liang

Thank you very much.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report