<?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 in drawing with ilogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8868085#M98675</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2129088"&gt;@RoyWickrama_RWEI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that below iLogic code may be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    Dim oDrawDoc As DrawingDocument
    oDrawDoc = ThisApplication.ActiveDocument
    Dim oLayer As Layer
    ' oLayer = oDrawDoc.StylesManager.Layers.Item(68)
    oLayer = oDrawDoc.StylesManager.Layers.Item("Title (ISO)")
    Dim oNewLayer As Layer
    oNewLayer_Name = "XYZ"
    Try
    	oNewLayer = oLayer.Copy(oNewLayer_Name)
    Catch
    	MessageBox.Show("New layer, " &amp;amp; oNewLayer_Name &amp;amp; ": Exists", "Title")
    End Try
	ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Visible = False
	ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Plot = False
	
	Dim brownColor As Color
	brownColor = ThisApplication.TransientObjects.CreateColor(165, 42, 42) 

	' the attributes of the layer to use the color,
	' have a solid line type, and a specific width.
	oNewLayer.Color = brownColor
	oNewLayer.LineType = kContinuousLineType
	oNewLayer.LineWeight = 0.02
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 10:15:13 GMT</pubDate>
    <dc:creator>chandra.shekar.g</dc:creator>
    <dc:date>2019-06-24T10:15:13Z</dc:date>
    <item>
      <title>Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8403914#M91441</link>
      <description>&lt;P&gt;Is it possible to paint (change colour) of some parts in a drawing using ilogic?&lt;/P&gt;&lt;P&gt;I have a drawing of an assembly, where are many elements.&lt;/P&gt;&lt;P&gt;I would like to automatically paint parts in specific colour (type of colour doesn't matter, can be red, green etc.).&lt;/P&gt;&lt;P&gt;When I paint "Element1" to red, I want all occurrences of "Element1" to be painted (since there are many) and on all views. This is important to me because number of occurrences changes.&lt;/P&gt;&lt;P&gt;How can I do it with ilogic?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 12:26:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8403914#M91441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-15T12:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405830#M91473</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that below forum discussion link may be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/update-drawing-line-colour-based-on-part-colour/td-p/7417136" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/update-drawing-line-colour-based-on-part-colour/td-p/7417136&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 07:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405830#M91473</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-11-16T07:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405855#M91474</link>
      <description>&lt;P&gt;Discussion from the link is about getting colour from the part and puting it to drawing.&lt;/P&gt;&lt;P&gt;In my case it is impossibile, because many different parts have the same colour (it is connected with material).&lt;/P&gt;&lt;P&gt;I would like to paint a specific part (all occurrences of this part) with some colour (for example red) with no connection to part colour.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 07:43:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405855#M91474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-16T07:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405966#M91476</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please provide sample assembly with drawing to test? Please make sure that files are non confidential.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 08:48:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8405966#M91476</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-11-16T08:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8406228#M91481</link>
      <description>&lt;P&gt;Ok I put a sample assembly with drawing.&lt;/P&gt;&lt;P&gt;Drawing has 2 sheets. First is balck and white. The second is coloured manually.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 10:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8406228#M91481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-16T10:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8409782#M91533</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below iLogic code to color parts in assembly. In this example, there are 3 parts in assembly. So, code works for 3 colors only. It extended for different colors based on situations.&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    Dim oDoc As DrawingDocument
    oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    oSheet = oDoc.ActiveSheet
    
    Dim layers As LayersEnumerator
    layers = oDoc.StylesManager.Layers
    
    On Error Resume Next
    Dim oRed As Layer
    oRed = layers.Item("Red")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim redColor As Color
        redColor = ThisApplication.TransientObjects.CreateColor(255, 0, 0)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oRed = layers.Item(1).Copy("Red")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oRed.Color = redColor
        oRed.LineType = kContinuousLineType
        oRed.LineWeight = 0.02
     End If
     
     On Error Resume Next
    Dim oGreen As Layer
    oGreen = layers.Item("Green")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim greenColor As Color
        greenColor = ThisApplication.TransientObjects.CreateColor(0, 255, 0)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oGreen = layers.Item(1).Copy("Green")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oGreen.Color = greenColor
        oGreen.LineType = kContinuousLineType
        oGreen.LineWeight = 0.02
     End If
     
     On Error Resume Next
    Dim oBlue As Layer
    oBlue = layers.Item("Blue")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim blueColor As Color
        blueColor = ThisApplication.TransientObjects.CreateColor(0, 0, 255)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oBlue = layers.Item(1).Copy("Blue")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oBlue.Color = blueColor
        oBlue.LineType = kContinuousLineType
        oBlue.LineWeight = 0.02
     End If
     
     Dim colorColl As ObjectCollection
     colorColl = ThisApplication.TransientObjects.CreateObjectCollection
     
     Call colorColl.Add(oRed)
     Call colorColl.Add(oBlue)
     Call colorColl.Add(oGreen)
     
    
    Dim oView As DrawingView
    For Each oView In oSheet.DrawingViews
        Dim oReferDoc As AssemblyDocument
        oReferDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
        
        Dim oAssyDef As AssemblyComponentDefinition
        oAssyDef = oReferDoc.ComponentDefinition
        
        Dim occDoc As Document
        Dim cnt As Integer
        cnt = 1
        For Each occDoc In oReferDoc.AllReferencedDocuments
            
            Dim occ As ComponentOccurrence
            For Each occ In oAssyDef.Occurrences
                If occ.ReferencedDocumentDescriptor.ReferencedDocument Is occDoc Then
                    Dim oCurves As DrawingCurvesEnumerator
                    oCurves = oView.DrawingCurves(occ)
                    
                    Dim oCurve As DrawingCurve
                    For Each oCurve In oCurves
                        Dim oColl As ObjectCollection
                        oColl = ThisApplication.TransientObjects.CreateObjectCollection
                        Dim oSegment As DrawingCurveSegment
                        For Each oSegment In oCurve.Segments
                            Call oColl.Add(oSegment)
                        Next
                        Call oSheet.ChangeLayer(oColl, colorColl.Item(cnt))
                        
                        Call oDoc.Update
                    Next
                End If
                
            Next
            cnt = cnt + 1
        Next
        
    Next
End Sub
&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:22:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8409782#M91533</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-11-19T07:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8409839#M91534</link>
      <description>&lt;P&gt;It works exactly as You said - three different parts become coloured in three different colours.&lt;/P&gt;&lt;P&gt;But what if I would like to call a specific part by name in order to paint it? For example:&lt;/P&gt;&lt;P&gt;Colour "Element 01" to red (all occurrences).&lt;/P&gt;&lt;P&gt;Colour "Element 02" to green (all occurrences).&lt;/P&gt;&lt;P&gt;Do not colour "Element 03" (not all parts need to be coloured)&lt;/P&gt;&lt;P&gt;Colour "Element 04" to blue (if exists)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is because number of different elements will change (there may be "Element 04", "Element 05" , "Element 03" may disappear, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:56:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8409839#M91534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-19T07:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8410022#M91540</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this.&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    Dim oDoc As DrawingDocument
    oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    oSheet = oDoc.ActiveSheet
    
    Dim layers As LayersEnumerator
    layers = oDoc.StylesManager.Layers
    
    On Error Resume Next
    Dim oRed As Layer
    oRed = layers.Item("Red")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim redColor As Color
        redColor = ThisApplication.TransientObjects.CreateColor(255, 0, 0)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oRed = layers.Item(1).Copy("Red")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oRed.Color = redColor
        oRed.LineType = kContinuousLineType
        oRed.LineWeight = 0.02
     End If
     
     On Error Resume Next
    Dim oGreen As Layer
    oGreen = layers.Item("Green")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim greenColor As Color
        greenColor = ThisApplication.TransientObjects.CreateColor(0, 255, 0)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oGreen = layers.Item(1).Copy("Green")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oGreen.Color = greenColor
        oGreen.LineType = kContinuousLineType
        oGreen.LineWeight = 0.02
     End If
     
     On Error Resume Next
    Dim oBlue As Layer
    oBlue = layers.Item("Blue")
     
    If Err.Number &amp;lt;&amp;gt; 0 Then
        On Error GoTo 0
        
        Dim blueColor As Color
        blueColor = ThisApplication.TransientObjects.CreateColor(0, 0, 255)
    
        ' Copy an arbitrary layer giving it the name
        ' of the render style.
        oBlue = layers.Item(1).Copy("Blue")
    
        ' the attributes of the layer to use the color,
        ' have a solid line type, and a specific width.
        oBlue.Color = blueColor
        oBlue.LineType = kContinuousLineType
        oBlue.LineWeight = 0.02
     End If 
	 
    Dim oView As DrawingView
    For Each oView In oSheet.DrawingViews
        Dim oReferDoc As AssemblyDocument
        oReferDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
        
        Dim oAssyDef As AssemblyComponentDefinition
        oAssyDef = oReferDoc.ComponentDefinition 
         
    	Dim occ As ComponentOccurrence
    	For Each occ In oAssyDef.Occurrences         
	        Dim oCurves As DrawingCurvesEnumerator
	        oCurves = oView.DrawingCurves(occ)
	        
	        Dim oCurve As DrawingCurve
	        For Each oCurve In oCurves
	            Dim oColl As ObjectCollection
	            oColl = ThisApplication.TransientObjects.CreateObjectCollection
	            Dim oSegment As DrawingCurveSegment
	            For Each oSegment In oCurve.Segments
	                Call oColl.Add(oSegment)
	            Next
				
				Dim occName As String 
				occName = occ.Name 
				If occName.StartsWith("Element 01") = True Then
					Call oSheet.ChangeLayer(oColl, oRed)
				Else If occName.StartsWith("Element 02") = True Then
					Call oSheet.ChangeLayer(oColl, oGreen)
				Else If occName.StartsWith("Element 04") = True Then
					Call oSheet.ChangeLayer(oColl, oBlue)
				End If 
	            
	            Call oDoc.Update
	        Next 
        
    	Next         
    Next
End Sub
&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 09:30:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8410022#M91540</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-11-19T09:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8866978#M98653</link>
      <description>&lt;P&gt;I am interested in assigning color to a layer in the drawing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Color: Dark Brown&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to assign colot to Dark Brown without success. Please help. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oLayer&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Layer&lt;/SPAN&gt;
    &lt;SPAN&gt;' oLayer = oDrawDoc.StylesManager.Layers.Item(68)&lt;/SPAN&gt;
    &lt;SPAN&gt;oLayer&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Layers&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Title (ISO)"&lt;/SPAN&gt;)
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNewLayer&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Layer&lt;/SPAN&gt;
    &lt;SPAN&gt;oNewLayer_Name&lt;/SPAN&gt; = &lt;SPAN&gt;"XYZ"&lt;/SPAN&gt;
    &lt;SPAN&gt;Try&lt;/SPAN&gt;
    &lt;SPAN&gt;oNewLayer&lt;/SPAN&gt; = &lt;SPAN&gt;oLayer&lt;/SPAN&gt;.&lt;SPAN&gt;Copy&lt;/SPAN&gt;(&lt;SPAN&gt;oNewLayer_Name&lt;/SPAN&gt;)
    &lt;SPAN&gt;Catch&lt;/SPAN&gt;
    &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"New layer, "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oNewLayer_Name&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;": Exists"&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;)
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;ThisDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Layers&lt;/SPAN&gt;(&lt;SPAN&gt;oNewLayer_Name&lt;/SPAN&gt;).&lt;SPAN&gt;Visible&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
&lt;SPAN&gt;ThisDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Layers&lt;/SPAN&gt;(&lt;SPAN&gt;oNewLayer_Name&lt;/SPAN&gt;).&lt;SPAN&gt;Plot&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;/PRE&gt;&lt;P&gt;Need help to assign&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 06:23:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8866978#M98653</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-06-23T06:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8868085#M98675</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2129088"&gt;@RoyWickrama_RWEI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that below iLogic code may be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    Dim oDrawDoc As DrawingDocument
    oDrawDoc = ThisApplication.ActiveDocument
    Dim oLayer As Layer
    ' oLayer = oDrawDoc.StylesManager.Layers.Item(68)
    oLayer = oDrawDoc.StylesManager.Layers.Item("Title (ISO)")
    Dim oNewLayer As Layer
    oNewLayer_Name = "XYZ"
    Try
    	oNewLayer = oLayer.Copy(oNewLayer_Name)
    Catch
    	MessageBox.Show("New layer, " &amp;amp; oNewLayer_Name &amp;amp; ": Exists", "Title")
    End Try
	ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Visible = False
	ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Plot = False
	
	Dim brownColor As Color
	brownColor = ThisApplication.TransientObjects.CreateColor(165, 42, 42) 

	' the attributes of the layer to use the color,
	' have a solid line type, and a specific width.
	oNewLayer.Color = brownColor
	oNewLayer.LineType = kContinuousLineType
	oNewLayer.LineWeight = 0.02
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 10:15:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8868085#M98675</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-06-24T10:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8869938#M98705</link>
      <description>&lt;P&gt;Hi Chandra Shekar;&lt;/P&gt;&lt;P&gt;Thanks a lot for the great help. It is fine. Also, I tailored the rule (see the attached .txt file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;brownColor_1 = ThisApplication.TransientObjects.CreateColor(xxx, xxx, xxx)&lt;/P&gt;&lt;P&gt;brownColor_2 = ThisApplication.TransientObjects.CreateColor(xxx, xxx, xxx)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you provide me with the coding for&amp;nbsp;brownColor_1&amp;nbsp; andbrownColor_2: see the image below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I know the list of&amp;nbsp;TransientObjects.CreateColor for all colors.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="2019-06-24 23_00_31.png" style="width: 636px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/650561i526FF17DD00590A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-06-24 23_00_31.png" alt="2019-06-24 23_00_31.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 06:15:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8869938#M98705</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-06-25T06:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8869999#M98707</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2129088"&gt;@RoyWickrama_RWEI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer below images to get RGB values for brown color.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brown_1.png" style="width: 539px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/650571iEA909E06090FBFBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Brown_1.png" alt="Brown_1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brown_2.png" style="width: 539px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/650572iFEDC20B54133FA7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Brown_2.png" alt="Brown_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 06:50:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8869999#M98707</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-06-25T06:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8872422#M98742</link>
      <description>&lt;P&gt;Thanks a lot for the help.&lt;/P&gt;&lt;P&gt;That is fine.&lt;/P&gt;&lt;P&gt;I am taking sometime off from Inventor customization training (from today till end of Sept) for taking some strenuous self faced training in using SolidWorks 2019.&lt;/P&gt;&lt;P&gt;Planning to take very high skills in Solidworks as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 03:14:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/8872422#M98742</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-06-26T03:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/10070611#M120891</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;How do you change the colour of a iPart in Drawing?&lt;BR /&gt;That is very importante for me &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 19:35:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/10070611#M120891</guid>
      <dc:creator>anthony.ravello</dc:creator>
      <dc:date>2021-02-09T19:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change part colour in drawing with ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/10070628#M120893</link>
      <description>&lt;P&gt;very interesting&lt;BR /&gt;is it Posible to change the colour of the Parts in Drawing using custom Properties?&lt;BR /&gt;I mean. Some parts have the same custom Property called "Green". Then in Drawing change all this parts in this color (&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;preferably&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; to have a layer with this name "Green" too)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 19:40:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-part-colour-in-drawing-with-ilogic/m-p/10070628#M120893</guid>
      <dc:creator>anthony.ravello</dc:creator>
      <dc:date>2021-02-09T19:40:54Z</dc:date>
    </item>
  </channel>
</rss>

