Community
Hello togehter,
how could I update the thumbnail in the file? The view should be isometric.
Thank you very much
Georg
Solved! Go to Solution.
Solved by xiaodong_liang. Go to 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