<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Save thumbnail as image file in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012082#M6430</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;&amp;nbsp;What is the use case for saving out the thumbnail?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 16:55:45 GMT</pubDate>
    <dc:creator>chris</dc:creator>
    <dc:date>2024-09-10T16:55:45Z</dc:date>
    <item>
      <title>Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13010779#M6425</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i save the thumbnail with ilogic in a part-file?&lt;BR /&gt;&lt;BR /&gt;I have written this ilogic code, but it is not working - Can somebody help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Imports System.Windows.Forms
Imports System.Drawing
AddReference "System.Drawing"
AddReference "stdole"
 
Sub Main
    ' Get the active document (must be a PartDocument)
    Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument
    If oPartDoc.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kPartDocumentObject Then
        MsgBox("Please open a part document.")
        Exit Sub
    End If
 
    ' Get the thumbnail from iProperties
  Dim oThumbnail As stdole.IPictureDisp = oPartDoc.PropertySets.Item("Inventor Summary Information").Item("Thumbnail").Value
 
 
    ' Convert the IPictureDisp to a .NET Bitmap object using the converter class
    Dim oPicture As System.Drawing.Image = IPictureDispConverter.PictureDispToImage(oThumbnail)
 
    If oPicture IsNot Nothing Then
        ' Use the oPicture object, for example:
MsgBox("Thumbnail converted successfully!")
oPicture.Save("C:\TEMP\Thumbnail.jpg")
    Else
        MsgBox("Failed to convert thumbnail.")
    End If
End Sub
 
' Custom class that exposes the GetPictureFromIPictureDisp method from AxHost
Public NotInheritable Class IPictureDispConverter : Inherits AxHost
    Private Sub New()
        MyBase.New("")
    End Sub
 
    ' Function to convert IPictureDisp to Image
    Public Shared Function PictureDispToImage(oThumbnail As stdole.IPictureDisp) As Image
        Try
            ' Use the protected method from AxHost to convert IPictureDisp to Image
            Return GetPictureFromIPictureDisp(oThumbnail)
        Catch ex As Exception
            myparam = InputBox("Error converting: ", "Conversion Error", ex.Message)
            Return Nothing
        End Try
    End Function
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 05:10:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13010779#M6425</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2024-09-10T05:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011792#M6426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;.&amp;nbsp; I am not 100% sure if this is the only detail, but it looks to me like you have not created a 'New' instance of the 'IPictureDispConverter' Class, before trying to use the method defined within that Class.&amp;nbsp; So, you may need to use an extra line of code to declare a variable to represent an instance of that Class, then use the 'New' keyword when setting its value to that Class Type.&amp;nbsp; Then use that variable in that line that is trying to use the method within that Class.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 14:43:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011792#M6426</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-09-10T14:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011793#M6427</link>
      <description>&lt;P&gt;I have been using different conversion method between &lt;EM&gt;&lt;STRONG&gt;Image&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;IPictureDisp&lt;/STRONG&gt;&lt;/EM&gt; for many years and it works well. Here is my sample.&lt;/P&gt;&lt;P&gt;Note: Converted image is not JPG but PNG.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;AddReference "stdole"
AddReference "System.Drawing"


Sub Main()
	' Get the active document (must be a PartDocument)
	Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument
	If oPartDoc.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kPartDocumentObject Then
		MsgBox("Please open a part document.")
		Exit Sub
	End If

	' Get the thumbnail from iProperties
	Dim oThumbnail As stdole.IPictureDisp = oPartDoc.Thumbnail
	
	' Convert the IPictureDisp to a .NET Bitmap object using the converter class
	'Dim oPicture As System.Drawing.Image = IPictureDispConverter.PictureDispToImage(oThumbnail)
	Dim oPicture As System.Drawing.Image = PictureDispToImage(oThumbnail)

	If oPicture IsNot Nothing Then
		' Use the oPicture object, for example:
		MsgBox("Thumbnail converted successfully!")
		oPicture.Save("C:\TEMP\Thumbnail.png")
	Else
		MsgBox("Failed to convert thumbnail.")
	End If
End Sub

Public Shared Function PictureDispToImage(pictureDisp As stdole.IPictureDisp) As System.Drawing.Image
	Dim image As System.Drawing.Image
	If pictureDisp IsNot Nothing Then
		If pictureDisp.Type = 1 Then
			Dim hpalette As IntPtr = New IntPtr(pictureDisp.hPal)
			image = image.FromHbitmap(New IntPtr(pictureDisp.Handle), hpalette)
		End If
		If pictureDisp.Type = 2 Then
			image = New System.Drawing.Imaging.Metafile(New IntPtr(pictureDisp.Handle), New System.Drawing.Imaging.WmfPlaceableFileHeader())
		End If
	End If
	Return image
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 14:43:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011793#M6427</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-09-10T14:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011977#M6428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;.&amp;nbsp; I like that your example code does not appear to need to define a special Class to work with, but it produces the same problematic results as the other methods do...the image looks like it has been squished from top to bottom.&amp;nbsp; I have seen this process before on StackOverflow (&lt;A href="https://stackoverflow.com/questions/468972/how-to-convert-ipicturedisp-to-system-drawing-image" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;), but I did not understand the &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/stdole.ipicturedisp.type" target="_blank" rel="noopener"&gt;IPictureDisp.Type&lt;/A&gt; property, so never really explored it any further.&amp;nbsp; &amp;nbsp;I believe an extra step is needed in the middle, just before saving the image to disk, where it sets the size / dimensions of the image to be at least the same 'ratio', if not the same size, as the original.&amp;nbsp; So, I copied your code, modified a few things, such as eliminating document type check (works good on all document types for me), and changing a few variable names, then inserted an extra line to set the size of the image, just before it gets saved to file.&amp;nbsp; It is working OK so far.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;AddReference "stdole"
AddReference "System.Drawing"
Imports System.Drawing
Imports System.Drawing.Imaging
Sub Main
	Dim oDoc As Document = ThisDoc.Document
	Dim oThumbnail As stdole.IPictureDisp = oDoc.Thumbnail
	Dim oPicture As System.Drawing.Image = PictureDispToImage(oThumbnail)
	If oPicture IsNot Nothing Then
		oPicture = New Bitmap(oPicture, New Size(oThumbnail.Width, oThumbnail.Height))
		Dim sNewFile As String = System.IO.Path.ChangeExtension(oDoc.FullFileName, ".png")
		oPicture.Save(sNewFile, System.Drawing.Imaging.ImageFormat.Png)
		Logger.Info("Save Document Thumbnail To Image File Worked!")
	Else
		Logger.Debug("Save Document Thumbnail To Image File Failed!")
	End If
End Sub

Public Shared Function PictureDispToImage(pictureDisp As stdole.IPictureDisp) As System.Drawing.Image
	Dim oImage As System.Drawing.Image
	If pictureDisp IsNot Nothing Then
		If pictureDisp.Type = 1 Then
			Dim hpalette As IntPtr = New IntPtr(pictureDisp.hPal)
			oImage = oImage.FromHbitmap(New IntPtr(pictureDisp.Handle), hpalette)
		End If
		If pictureDisp.Type = 2 Then
			oImage = New System.Drawing.Imaging.Metafile(New IntPtr(pictureDisp.Handle), New System.Drawing.Imaging.WmfPlaceableFileHeader())
		End If
	End If
	Return oImage
End Function&lt;/LI-CODE&gt;
&lt;P&gt;The resulting image file looks pretty much identical to what I see in the Windows file explorer now, when I have it set to 'Extra Large Icons'.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 16:08:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13011977#M6428</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-09-10T16:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012045#M6429</link>
      <description>&lt;P&gt;It is also interesting that I was able to use this process, because I am still using Inventor Pro 2024.3, but that &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.fromhbitmap" target="_blank" rel="noopener"&gt;Image.FromHbitmap&lt;/A&gt;&amp;nbsp;method is for .NET 9, according to its online documentation page, and I know that Inventor 2025 moved from .Net Framework to .NET 8.&amp;nbsp; Maybe it is working for me because I also have Visual Studio 2022 Community installed.&amp;nbsp; Within the iLogic rule I am running the code from, it does not offer any 'Intellisense' pop-up hint for that method, as if it does not recognize it, but it must be working OK, because I have tested it multiple times now, and it has been producing good image files so far.&amp;nbsp; Now I wander if others may not be able to use this process if they do not have Inventor 2025 yet, and do not have Visual Studio installed either.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 16:45:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012045#M6429</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-09-10T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012082#M6430</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;&amp;nbsp;What is the use case for saving out the thumbnail?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 16:55:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012082#M6430</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-09-10T16:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012625#M6431</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;can you change your above code to include the current view of the part. For example, I have mine set to a "Front" View zoomed into a specific distance to fill the screen, can I make it save that? Or better yet, could it be set to save out all 6 cube views? (top, bottom, left, right, front, back)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chris_0-1726005782898.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1407672iC33DED8D7B8DB28D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chris_0-1726005782898.png" alt="chris_0-1726005782898.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 22:03:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13012625#M6431</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-09-10T22:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013131#M6432</link>
      <description>Hi&lt;BR /&gt;We are trying to make a automated sales document directly from a Factory layout into a Word document, and we would like to show the thumbnail in this sales document.</description>
      <pubDate>Wed, 11 Sep 2024 05:20:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013131#M6432</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2024-09-11T05:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013154#M6433</link>
      <description>&lt;P&gt;Renders look so much better. Our old catalogs used CAD views, once I was hired our catalog images went to this, still using the CAD data. If you guys would like to see what your CAD would look like rendered, just PM me&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chris_0-1726033022139.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1407806i3381BC1AB1527291/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chris_0-1726033022139.png" alt="chris_0-1726033022139.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 05:37:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013154#M6433</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-09-11T05:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013177#M6434</link>
      <description>&lt;P&gt;Thanks everyone!&lt;BR /&gt;I adjusted the code to loop through an assemply.&amp;nbsp;&lt;BR /&gt;If anyone else needs it&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AddReference "stdole"
AddReference "System.Drawing"
Imports System.Drawing
Imports System.Drawing.Imaging
Sub Main
	' Define the directory to save images
	Dim savePath As String = "C:\TEMP\"
	
	'Dim oDoc As Document = ThisDoc.Document
	
	' Get the active document
	Dim oAsmDoc As AssemblyDocument
	oAsmDoc = ThisApplication.ActiveDocument
	Dim oThumbnail As stdole.IPictureDisp '= oDoc.Thumbnail
	Dim oPicture As System.Drawing.Image '= PictureDispToImage(oThumbnail)
	Dim sNewFile As String ' = System.IO.Path.ChangeExtension(imagePath &amp;amp; oOccurrenceName &amp;amp; ".png")
	
	For Each oOccurrence In oAsmDoc.ComponentDefinition.Occurrences
	    ' Check if the occurrence is a part document (.ipt)
	    If oOccurrence.DefinitionDocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject Then
			
	    ' Get the properties
		oPartDoc = oOccurrence.Definition.Document
	    'oTitle = oPartDoc.PropertySets.Item("Inventor Summary Information").Item("Title").Value
	    'oAuthor = oPartDoc.PropertySets.Item("Inventor Summary Information").Item("Author").Value
		
		oThumbnail = oPartDoc.PropertySets.Item("Inventor Summary Information").Item("Thumbnail").Value
		oPicture = PictureDispToImage(oThumbnail)
		
		If oPicture IsNot Nothing Then
			oPicture = New Bitmap(oPicture, New Size(oThumbnail.Width, oThumbnail.Height))
			sNewFile = savePath &amp;amp; Replace(oOccurrence.Name,":","-") &amp;amp; ".png"
			oPicture.Save(sNewFile, System.Drawing.Imaging.ImageFormat.Png)
			Logger.Info("Save Document Thumbnail To Image File Worked!")
		Else
			Logger.Debug("Save Document Thumbnail To Image File Failed!")
		End If
		
		Else
			Logger.Debug("Document is not a Part-document!")
		End If
	Next
End Sub

Public Shared Function PictureDispToImage(pictureDisp As stdole.IPictureDisp) As System.Drawing.Image
	Dim oImage As System.Drawing.Image
	If pictureDisp IsNot Nothing Then
		If pictureDisp.Type = 1 Then
			Dim hpalette As IntPtr = New IntPtr(pictureDisp.hPal)
			oImage = oImage.FromHbitmap(New IntPtr(pictureDisp.Handle), hpalette)
		End If
		If pictureDisp.Type = 2 Then
			oImage = New System.Drawing.Imaging.Metafile(New IntPtr(pictureDisp.Handle), New System.Drawing.Imaging.WmfPlaceableFileHeader())
		End If
	End If
	Return oImage
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 05:53:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013177#M6434</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2024-09-11T05:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013186#M6435</link>
      <description>Hi Chris&lt;BR /&gt;Renders looks amazing!&lt;BR /&gt;But aren't renders a time-consuming process? It will be too computer demanding if I have to make renders of 50-200 parts in a assemply?</description>
      <pubDate>Wed, 11 Sep 2024 05:57:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013186#M6435</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2024-09-11T05:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013205#M6436</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;. Thank you for improvement of image ratio.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't afraid of usage method&amp;nbsp; &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.fromhbitmap?view=netframework-4.8" target="_blank"&gt;Image.FromHbitmap&lt;/A&gt;. It was introduced in .NET Framework 1.1 (Released&amp;nbsp; 2003-07-10)&lt;/P&gt;&lt;P&gt;This method is just one of a few in my&amp;nbsp;&lt;A href="https://github.com/CSmichaelnavara/InventorAddInDebugger/blob/main/Development/src/InventorAddInDebugger/InventorAddInDebugger/Common/PictureDispConverter.cs" target="_blank"&gt;PictureDispConverter&lt;/A&gt; which I have been using for many years.&lt;/P&gt;&lt;P&gt;Values of IPictureDisp.Type are described in&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/windows/win32/com/pictype-constants" target="_blank"&gt;PICTYPE Constants&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 06:09:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013205#M6436</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-09-11T06:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013218#M6437</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;If you want to generate images for technical documentation, it is much better to create images from &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-AF417DB3-323F-40D6-8C8C-35D73611DD4E" target="_blank"&gt;Camera&lt;/A&gt; object. There you can setup view which is the best for current situation. You can set direction of view, image size, background color (include transparent for PNG), etc. Also you can generate more than one image for each component and designer of documentation can choose the best one.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;TIP:&lt;/STRONG&gt;&lt;/U&gt; For too long items like conveyors or beams you can create image in direction of diagonal of RangeBox. It produces much better result then standard isometric view.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 06:21:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13013218#M6437</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-09-11T06:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13014204#M6438</link>
      <description>&lt;P&gt;Thanks for the additional information and links&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;.&amp;nbsp; That also cleared up a secondary issue I was seeing with that method, where I was trying to use it for retrieving ButtonDefinition.LargeIcon &amp;amp; ButtonDefinition.StandardIcon to image files.&amp;nbsp; Years ago I used to do this with a relatively simple looking VBA macro, which used the older system, for helping create new, slightly different icons for my own macros &amp;amp; rule buttons.&amp;nbsp; Then I switched to a newer iLogic rule based system, but did not like that system very well.&amp;nbsp; Using the information you linked to, and a technique from your linked method, I modified my iLogic rule based tool for extracting command icons to properly sized and properly named image files, ready for minor edits then reuse in my other rule button icons.&amp;nbsp;&amp;nbsp;I will attach that tool here as a text file also, for reference, because it may be helpful/useful/informational to others too.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 14:20:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13014204#M6438</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-09-11T14:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13014529#M6439</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;&amp;nbsp;&amp;nbsp;They can be, I rendered out almost 1000 parts and all the large Pump skid assemblies, it took some time, but I leveraged all the CAD models I created. It's mainly a quality issue. Plus you can create "models" that can be rotated on the webpage. IMO, it's just better and cheaper than hiring a photographer or buying everything needed to take product photos, which I do as well, but I'd rather just get or make the model and render it&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 16:13:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/13014529#M6439</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-09-11T16:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187833#M181086</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Your code gives good/expected result when used from Inventor 2024.4.2&lt;BR /&gt;BUT&lt;BR /&gt;as for newer releases result begin somehow depend on Windows Display Scale value:&lt;BR /&gt;&lt;BR /&gt;- 2025.4.1, 100% - ok&lt;BR /&gt;- 2026.3, 100% - TRIMMED(UPSCALED)&lt;BR /&gt;- 2027.0.1, 100% - ok&lt;BR /&gt;&lt;BR /&gt;- 2025.4.1, 125% - DOWNSCALED&lt;BR /&gt;- 2026.3, 125% - ok&lt;BR /&gt;- 2027.0.1, 125% - DOWNSCALED&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaximCADman77_0-1783100047837.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1648889i4DB5F9FB41AAE612/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaximCADman77_0-1783100047837.png" alt="MaximCADman77_0-1783100047837.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;,&lt;BR /&gt;is there any Inventor-Release and Windows-Display-Scale independent, yet reliable, code to export Inventor Document Thumbnail to the raster image (equivalent to that showed by Windows Explorer)?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2026 18:19:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187833#M181086</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2026-07-03T18:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187920#M181087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/572109"&gt;@Maxim-CADman77&lt;/a&gt;&amp;nbsp;- could you post the code that you're using? Please attach it as a text file.&lt;/P&gt;
&lt;P&gt;Or if you are using unmodified code as posted above by&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;, please let me know the message number.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2026 22:55:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187920#M181087</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2026-07-03T22:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187928#M181088</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;My note was about the code from the only message marked as solution (message 4)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2026 20:50:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14187928#M181088</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2026-07-03T20:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14189225#M181090</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/572109"&gt;@Maxim-CADman77&lt;/a&gt;&amp;nbsp;- please try the attached rule. Notice that you can edit it to set the image resolution (width and height). It is currently set to 320. In my tests, this rule is not affected by the Windows display scale.&lt;BR /&gt;I also found that the rule in Message 4 produced images that had an unnecessarily high resolution and took up a lot of space on disk as a result. This rule doesn't have that problem. Maybe the resolution is too low for some purposes. You can increase it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The commented-out AddReference statements are required on .NET 10. Inventor 2027 runs on .NET 10, and the upcoming 2026.4 release also will.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2026 22:37:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14189225#M181090</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2026-07-05T22:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Save thumbnail as image file</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14189665#M181091</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Unfortunately your code doesn't solve the issue for me&lt;BR /&gt;Here is a result in Windows 10 22H2:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Win10-22H2.png" style="width: 672px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1649197iA9B37B0150D721BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Win10-22H2.png" alt="Win10-22H2.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;On Win 11 25H2:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaximCADman77_0-1783330276426.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1649198iD405E294A14FCB20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaximCADman77_0-1783330276426.png" alt="MaximCADman77_0-1783330276426.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the result is even more unpredictable then I thought.&lt;BR /&gt;&lt;BR /&gt;PS:&lt;BR /&gt;Screenshot in message 16 was taken from Win 11 25H2&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2026 14:14:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-thumbnail-as-image-file/m-p/14189665#M181091</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2026-07-06T14:14:56Z</dc:date>
    </item>
  </channel>
</rss>

