<?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: Loading an Icon in Inventor 2025 in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745807#M10636</link>
    <description>&lt;P&gt;See the Inventor 2025 SDK. There is a sample how to convert Icon to IPictureDisp&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;...\DeveloperTools\Samples\VCSharp.NET\AddIns\SimpleAddIn\PictureDispConverter.cs&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 12:03:40 GMT</pubDate>
    <dc:creator>Michael.Navara</dc:creator>
    <dc:date>2024-05-01T12:03:40Z</dc:date>
    <item>
      <title>Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745530#M10634</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Inventor 2024 addin uses the following to put a button with an icon on the toolbar.&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;            stdole.IPictureDisp standardIconIPictureDisp = null;
            stdole.IPictureDisp largeIconIPictureDisp = null;
            if (standardIcon != null)
            {
#pragma warning disable CS0618 // Type or member is obsolete
                standardIconIPictureDisp = Support.IconToIPicture(standardIcon) as stdole.IPictureDisp;
                largeIconIPictureDisp = (stdole.IPictureDisp)Support.IconToIPicture(largeIcon);
#pragma warning restore CS0618 // Type or member is obsolete
            }

            mButtonDef = AddinGlobal.InventorApp.CommandManager.ControlDefinitions.AddButtonDefinition(
                displayName, internalName, commandType,
                clientId, description, tooltip,
                standardIconIPictureDisp, largeIconIPictureDisp, buttonDisplayType);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this does not work with Inventor 2025 as .NET no longer supports&amp;nbsp;Microsoft.VisualBasic.Compatibility.VB6 which provides the&amp;nbsp;Support.IconToIPicture function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 09:07:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745530#M10634</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2024-05-01T09:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745798#M10635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1197953"&gt;@pfk&lt;/a&gt;.&amp;nbsp; I do not currently create Inventor add-ins, or code with C#, but I may be able to help with this specific issue.&amp;nbsp; There has been a newer way to convert between the 'IPictureDisp' type and the 'Image' type for further processing/conversion.&amp;nbsp; It uses the System.Windows.Forms.AxHost Class, or at least a sub class that utilizes that class.&amp;nbsp; Below are a few links you can look into.&amp;nbsp; The first is the oldest.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://modthemachine.typepad.com/my_weblog/2012/05/thumbnail-viewer-component-on-a-64-bit-system.html" target="_blank" rel="noopener"&gt;https://modthemachine.typepad.com/my_weblog/2012/05/thumbnail-viewer-component-on-a-64-bit-system.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogicmini-toolbar-combo-box-list-item-icon-from-browser-node/m-p/11029159/highlight/true#M135937" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogicmini-toolbar-combo-box-list-item-icon-from-browser-node/m-p/11029159/highlight/true#M135937&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost.getipicturedispfrompicture" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost.getipicturedispfrompicture&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost.getpicturefromipicturedisp" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost.getpicturefromipicturedisp&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.save" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.save&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.getthumbnailimage" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.drawing.image.getthumbnailimage&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 12:00:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745798#M10635</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-05-01T12:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745807#M10636</link>
      <description>&lt;P&gt;See the Inventor 2025 SDK. There is a sample how to convert Icon to IPictureDisp&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;...\DeveloperTools\Samples\VCSharp.NET\AddIns\SimpleAddIn\PictureDispConverter.cs&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 12:03:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12745807#M10636</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-05-01T12:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12746763#M10637</link>
      <description>&lt;P&gt;There is an alternative to the "Microsoft.VisualBasic.Compatibility.VB6 ". You can create your own utility class that lets you get rid of that namespace functionality.&lt;/P&gt;
&lt;P&gt;You can find the code for the utility class here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/manufacturing/2012/06/how-to-convert-iconbitmap-to-ipicturedisp-without-visualbasiccompatibilityvb6supporticontoipicture.html" target="_blank"&gt;https://adndevblog.typepad.com/manufacturing/2012/06/how-to-convert-iconbitmap-to-ipicturedisp-without-visualbasiccompatibilityvb6supporticontoipicture.html&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In my tutorial post "&lt;A href="http://www.hjalte.nl/tutorials/61-adding-icons-to-your-buttons" target="_blank" rel="noopener"&gt;Adding icons to your buttons&lt;/A&gt;" you can see how to use the utility class. However, it's written in vb.net&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 19:25:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12746763#M10637</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-05-01T19:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12747068#M10638</link>
      <description>&lt;P&gt;&lt;STRONG&gt;...\DeveloperTools\Samples\VCSharp.NET\AddIns\SimpleAddIn\PictureDispConverter.cs worked nicely - thank you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Paul&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 23:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/12747068#M10638</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2024-05-01T23:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Loading an Icon in Inventor 2025</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/13776835#M176669</link>
      <description>&lt;P&gt;Honestly, it seems very cumbersome just to have icons loaded in Inventor addons. And it did not get better with .NET 8.0. Is this something that could be tackled by the Autodesk developers in the Inventor API?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 07:55:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/loading-an-icon-in-inventor-2025/m-p/13776835#M176669</guid>
      <dc:creator>gilsdorf_e</dc:creator>
      <dc:date>2025-08-21T07:55:44Z</dc:date>
    </item>
  </channel>
</rss>

