<?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: iLogic to change color of component of a sub-assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/10644478#M129300</link>
    <description>&lt;P&gt;Wondering if anyone has found a different/easier method of executing the below Part Colour commands from an assembly without having to host the code within the part itself;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;iProperties.PartColor = Part_Colour
iLogicVb.UpdateWhenDone = True

Logger.Info(ThisDoc.FileName.ToString + ", " + iLogicVb.RuleName.ToString + ", " + Part_Colour)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a few methods of changing the part colour from an assembly, but all have proven messy due to multiple View Reps (in both part and assembly) with unwanted colour overrides messing things up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "iProperties.PartColor" command does exactly what I need when executed in the Part whilst the Master View Rep (as all other Part View Reps then match the master) is active - however it's annoying knowing that I'm nesting this code within the part, when really I'm needing it executed from the assembly upon the part(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate anyone's help on this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a side note, I've solved this problem with iLogic external rules but unfortunately can't use them in the dev environment due to reasons.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Sep 2021 07:54:17 GMT</pubDate>
    <dc:creator>KarlH_</dc:creator>
    <dc:date>2021-09-24T07:54:17Z</dc:date>
    <item>
      <title>iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/6761248#M68773</link>
      <description>&lt;P&gt;If the component is on the top level, I can use this to change its color:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Componment.Color("TopLevelPart:1") = "Red"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The same does not work when the part is in a sub-assembly.&amp;nbsp;&amp;nbsp; How can I do the same for each part in an assembly?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Componment.Color("SubAssemblyPart:1") = "Red"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Componment.Color("TopLevelAssembly", "SubAssemblyPart:1") = "Red"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But neither changes the SubAssemblyPart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iProperties.PartColor = "Red" works as a rule run in a part file, but not an assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For an assembly, another option is to use a rule function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iProperties.Value("filename.ipt", "property tab name", "property name")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't figure out if "PartColor" is the correct "property name" or what the right value for "property tab name" is.&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 18:26:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/6761248#M68773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-20T18:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/7315563#M74361</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe to late....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use the command makepath like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Component.Color(MakePath("assembly:1","Part:1"))="RED"&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;Dominique&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 11:04:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/7315563#M74361</guid>
      <dc:creator>DRudaz</dc:creator>
      <dc:date>2017-08-21T11:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/7664625#M78588</link>
      <description>&lt;P&gt;I was running into the same problem. Found this post in the search to resolve my issue and thought I would come back with the solution I found through some trial and error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code below I am iterating through sub assemblies to set the color of parts and it is designed to drill down into the sub assembly. I was trying to use "Component.Color" to change the color of sub parts and ran into a similar problem. Strangely, the part would have the new color associated with it when I examine the part, but it would not update the color on the screen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I changed the code to use "SetRenderStyle" the color would update correctly. Hope this helps the next person that comes along with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim asmDoc As AssemblyDocument
asmDoc = ThisApplication.ActiveDocument

' set color for the standard screws
Call SetColor(asmDoc.ComponentDefinition.Occurrences,"R14400","Zinc")SyntaxEditor Code Snippet&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;Private&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;SetColor&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Occurrences&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrences&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SearchName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Color&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; Iterate through each of the occurrences in the collection provided.&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; 
    &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt; 
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
    &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
        &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; Check to see if the object is active.&lt;/SPAN&gt;
        &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Component&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;IsActive&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;            
        &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; Check to see if the part number from the iProperties matches the search name.&lt;/SPAN&gt;
            &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Project&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Part Number&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;SearchName&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
                &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; Set the part color&lt;/SPAN&gt;
                &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Component.Color(occ.Name) = Color&lt;/SPAN&gt;
                &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SetRenderStyle&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;kOverrideRenderStyle&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;RenderStyles&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Item&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Color&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;
            &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
        
            &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DefinitionDocumentType&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
                &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Component&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;IsActive&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
                    &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;SetColor&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;occ&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SubOccurrences&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SearchName&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Color&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
                &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
            &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
        &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
    &lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 17:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/7664625#M78588</guid>
      <dc:creator>insomnix</dc:creator>
      <dc:date>2018-01-04T17:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8795874#M97537</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried your code in version Inventor 2020 and doesn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 15:11:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8795874#M97537</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2019-05-16T15:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8798408#M97562</link>
      <description>&lt;P&gt;I don't have 2020, so no way for me to test, but I would think it would still work. Did you change any of the code? Did you place the first snippet of code into the Main sub?&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 15:56:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8798408#M97562</guid>
      <dc:creator>insomnix</dc:creator>
      <dc:date>2019-05-17T15:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8798497#M97564</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm sorry. I'm getting started with iLogic and I don't understand much yet. But I'm learning. Error see video.&amp;nbsp;I have version Inventor 2019 and 2020.&amp;nbsp;Please can you help? Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 16:28:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8798497#M97564</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2019-05-17T16:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8802516#M97606</link>
      <description>&lt;P&gt;The second snippet of code is a procedure. Whenever you use functions or procedures in iLogic, a primary procedure must be created called Main. Any code you would normally place directly into the rule would be placed inside the Main procedure. Replace the first snippet of code with below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, make sure you replace&amp;nbsp;"R14400" with the name of the part you want to change color.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
Dim asmDoc As AssemblyDocument
asmDoc = ThisApplication.ActiveDocument

' set color for the standard screws
Call SetColor(asmDoc.ComponentDefinition.Occurrences,"R14400","Zinc")SyntaxEditor Code Snippet
End Sub
&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2019 16:30:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8802516#M97606</guid>
      <dc:creator>insomnix</dc:creator>
      <dc:date>2019-05-20T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8802937#M97608</link>
      <description>&lt;DIV class="tlid-input input"&gt;
&lt;DIV class="source-wrap"&gt;
&lt;DIV class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;
&lt;DIV class="source-input"&gt;
&lt;DIV class="source-footer-wrap source-or-target-footer"&gt;
&lt;DIV class="character-count tlid-character-count"&gt;
&lt;DIV class="cc-ctr normal"&gt;&lt;SPAN style="font-family: inherit;"&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="tlid-results-container results-container"&gt;
&lt;DIV class="tlid-result result-dict-wrapper"&gt;
&lt;DIV class="result tlid-copy-target"&gt;
&lt;DIV class="text-wrap tlid-copy-target"&gt;
&lt;DIV class="result-shield-container tlid-copy-target" tabindex="0"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Thank you.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;I gave this as a comment (SyntaxEditor Code Snippet)&amp;nbsp;Then everything works without error.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 May 2019 20:01:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/8802937#M97608</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2019-05-20T20:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to change color of component of a sub-assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/10644478#M129300</link>
      <description>&lt;P&gt;Wondering if anyone has found a different/easier method of executing the below Part Colour commands from an assembly without having to host the code within the part itself;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;iProperties.PartColor = Part_Colour
iLogicVb.UpdateWhenDone = True

Logger.Info(ThisDoc.FileName.ToString + ", " + iLogicVb.RuleName.ToString + ", " + Part_Colour)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a few methods of changing the part colour from an assembly, but all have proven messy due to multiple View Reps (in both part and assembly) with unwanted colour overrides messing things up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "iProperties.PartColor" command does exactly what I need when executed in the Part whilst the Master View Rep (as all other Part View Reps then match the master) is active - however it's annoying knowing that I'm nesting this code within the part, when really I'm needing it executed from the assembly upon the part(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate anyone's help on this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a side note, I've solved this problem with iLogic external rules but unfortunately can't use them in the dev environment due to reasons.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 07:54:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-color-of-component-of-a-sub-assembly/m-p/10644478#M129300</guid>
      <dc:creator>KarlH_</dc:creator>
      <dc:date>2021-09-24T07:54:17Z</dc:date>
    </item>
  </channel>
</rss>

