<?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: Change Part Colour Using &amp;quot;RGB&amp;quot; Values in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10393976#M125512</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how I do it :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Asset&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Assets&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;kAssetTypeAppearance&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Generic"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Appearances"&lt;/SPAN&gt;)

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ColorAssetValue&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"generic_diffuse"&lt;/SPAN&gt;)

&lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateColor&lt;/SPAN&gt;(0,145,255)

&lt;SPAN style="color: #800000;"&gt;oExtrude1&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Appearance&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;oExstrude1 is set before hand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jun 2021 07:03:11 GMT</pubDate>
    <dc:creator>FINET_Laurent</dc:creator>
    <dc:date>2021-06-16T07:03:11Z</dc:date>
    <item>
      <title>Change Part Colour Using "RGB" Values</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10392163#M125488</link>
      <description>&lt;P&gt;Can anybody help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to set the colour of a part, via a VBA macro, using RGB Values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone try the following VBA macro on a Inventor part (ipt) document and let me know if you are getting the same error as me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Function SetPartColour()&lt;BR /&gt;Dim oDoc As PartDocument&lt;/P&gt;&lt;P&gt;Set oDoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;Dim color As ColorAssetValue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Set color = oDoc.ActiveAppearance.Item("generic_diffuse")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;color.Value = ThisApplication.TransientObjects.CreateColor(Red, Green, Blue)&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error on the line highlighted in &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;RED&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know how I can fix the error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:14:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10392163#M125488</guid>
      <dc:creator>isocam</dc:creator>
      <dc:date>2021-06-15T15:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change Part Colour Using "RGB" Values</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10392456#M125492</link>
      <description>&lt;P&gt;What version of Inventor are you using?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 17:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10392456#M125492</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2021-06-15T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change Part Colour Using "RGB" Values</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10393954#M125510</link>
      <description>&lt;P&gt;I am currently using 2021 (And testing 2022).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there different macros to change the colour depending on what version of inventor you are using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 06:52:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10393954#M125510</guid>
      <dc:creator>isocam</dc:creator>
      <dc:date>2021-06-16T06:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change Part Colour Using "RGB" Values</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10393976#M125512</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how I do it :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Asset&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Assets&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;kAssetTypeAppearance&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Generic"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Appearances"&lt;/SPAN&gt;)

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ColorAssetValue&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"generic_diffuse"&lt;/SPAN&gt;)

&lt;SPAN style="color: #800000;"&gt;oColor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CreateColor&lt;/SPAN&gt;(0,145,255)

&lt;SPAN style="color: #800000;"&gt;oExtrude1&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Appearance&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oAppearence&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;oExstrude1 is set before hand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 07:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10393976#M125512</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2021-06-16T07:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change Part Colour Using "RGB" Values</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10395895#M125538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/84538"&gt;@isocam&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case it's of interest, attached is a 2019 file that creates a new appearance in the part and allows you to use sliders in a form to change the color dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 19:18:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-using-quot-rgb-quot-values/m-p/10395895#M125538</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2021-06-16T19:18:23Z</dc:date>
    </item>
  </channel>
</rss>

