<?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: How do I get Inventor to calculate and sum up painted faces in an assembly. in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566835#M308174</link>
    <description>&lt;P&gt;Alright this exports the info to an excel file in the same folder with the same name as the assembly you run it in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm kinda jealous of iLogic since it has simple excel functions for reading and writing unlike VBA. Though there isn't a way to create a new excel with those nifty functions that I saw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also added a few additional remarks to help people know what's going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main
    Dim oDoc As AssemblyDocument
    oDoc = ThisApplication.ActiveDocument
    
    ' Set a reference to the BOM
    Dim oBOM As BOM
    oBOM = oDoc.ComponentDefinition.BOM
    
    oBOM.StructuredViewFirstLevelOnly = False
    oBOM.StructuredViewEnabled = True

    'Set a reference to the "Structured" BOMView
    Dim oBOMView As BOMView
    oBOMView = oBOM.BOMViews.item("Structured")
    &lt;BR /&gt;    'Create a dictionary to store paint color and area in
    Dim Colors As Object
    Colors = CreateObject("Scripting.Dictionary")
    &lt;BR /&gt;    'Call subroutine to calculate paint areas
    Call PaintRecurse(oBOMView.BOMRows, Colors)
    &lt;BR /&gt;    'Set output file name
    xls = Replace(ThisDoc.Document.fullfilename,".iam",".xlsx")
&lt;BR /&gt;    'Check if output file exists, if not create it
    If (Dir(xls) = "") Then
	excelApp = CreateObject("Excel.Application")
	excelWorkbook = excelApp.Workbooks.Add
	excelWorkbook.SaveAs(xls)
	excelWorkbook.Close
    End If
&lt;BR /&gt;    'Open output file for writing
    GoExcel.Open(xls, "Sheet1")&lt;BR /&gt;    'Add header info
    GoExcel.CellValue(xls, "Sheet1", "A1") = "Color"
    GoExcel.CellValue(xls, "Sheet1", "B1") = "Area"
	
    num = 2
&lt;BR /&gt;    'Loop through each color and add to the excel file
    For Each item In Colors
	GoExcel.CellValue(xls, "Sheet1", "A" &amp;amp; num) = item &lt;BR /&gt;        'Area is returned in cm^3 by default so multiply by factor to get m^3
	GoExcel.CellValue(xls, "Sheet1", "B" &amp;amp; num) = Colors(item) * .0001
	GoExcel.CellValue(xls, "Sheet1", "C" &amp;amp; num) = "m^3"
	num = num + 1
    Next
&lt;BR /&gt;    'Save and Close excel file
    GoExcel.Save
    GoExcel.Close
	
    MsgBox("Paint colors exported to " &amp;amp; xls)
End Sub

Private Sub PaintRecurse(oBOMRows As BOMRowsEnumerator, Colors As Object, Optional SubQty As Integer = 1)
    On Error Resume Next
    ' Iterate through the contents of the BOM Rows.
    Dim i As Long
    For i = 1 To oBOMRows.count
        ' Get the current row.
        Dim oRow As BOMRow
        oRow = oBOMRows.item(i)
  
        'Set a reference to the primary ComponentDefinition of the row
        Dim oCompDef As ComponentDefinition
        oCompDef = oRow.ComponentDefinitions.item(1)
        &lt;BR /&gt;        'Checks if current item is a part, skip if not a part
        If (oCompDef.Document.DocumentType = kPartDocumentObject) Then&lt;BR /&gt;            'Set a reference to the faces on the current part
            Dim oFaces As Faces
            oFaces = oCompDef.SurfaceBodies(1).Faces
&lt;BR /&gt;            'Loop through all faces of part and add the appearance and area to the dictionary
            Dim oFace As Face
            For Each oFace In oFaces
                Colors(oFace.Appearance.DisplayName) = Colors(oFace.Appearance.DisplayName) + oFace.Evaluator.Area * oRow.ItemQuantity * SubQty
            Next
        End If

        'Recursively iterate child rows if present.
        If Not oRow.ChildRows Is Nothing Then Call PaintRecurse(oRow.ChildRows, Colors, oRow.ItemQuantity * SubQty)
    Next
End Sub&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Sep 2016 14:13:48 GMT</pubDate>
    <dc:creator>pball</dc:creator>
    <dc:date>2016-09-16T14:13:48Z</dc:date>
    <item>
      <title>How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6563969#M308165</link>
      <description>Hi everyone. I have a problem in Inventor. I have an assembly containing several parts, sheet metals and sub-assemblies. All in the same material - but some of the faces are coloured red for show the inside of my assembly (for the painter to see whats inside and whats outside). I need to determine the total areas of lets say all in red (RAL 2004) and all in normal steel gray. How do I get a total list with the total red square meters and total gray square meters.? I hope some of you can help. BTW Im really new to computing in Inventor Ilogic so I hope you will be pretty precise &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks.</description>
      <pubDate>Thu, 15 Sep 2016 12:39:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6563969#M308165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-15T12:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564169#M308166</link>
      <description>&lt;P&gt;Hummmm, i don't know if it is possible, i guess not.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 13:42:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564169#M308166</guid>
      <dc:creator>CCarreiras</dc:creator>
      <dc:date>2016-09-15T13:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564203#M308167</link>
      <description>Hi. I find that i bit odd. The way I see it Inventor must have an unique ID for each face and thereby the properties for that face. It would then help me if Inventor cound give me a total list of all areas (1 to 400) for example and then state the dimensions (x,y,z), maybe the area (which it haves anyway) and then the RAL code of that particulary area. If so - then we could get Inventor to export this to Excel and inthere its possible to sum up the cells which contains identical information such as the RAL code. Hope you get my point. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 15 Sep 2016 13:51:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564203#M308167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-15T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564414#M308168</link>
      <description>&lt;P&gt;Anything* is possible!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should get every surface in a part. I also learned about using a dictionary in VBA, never used one before and I really like it for dynamic things like this. Probably could clean things up if I actually learned how to use them properly but proof of concept works.&lt;/P&gt;&lt;PRE&gt;Public Sub paint()
    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument

    Dim oFaces As Faces
    Set oFaces = oPartDoc.ComponentDefinition.SurfaceBodies(1).Faces
    
    Dim Colors As Object
    Set Colors = CreateObject("Scripting.Dictionary")
        
    Dim oFace As Face
    For Each oFace In oFaces
         Colors(oFace.Appearance.DisplayName) = Colors(oFace.Appearance.DisplayName) + oFace.Evaluator.Area
    Next
    
    For Each Item In Colors
        Debug.Print "Paint: " &amp;amp; Item &amp;amp; " Area: "; Colors(Item) &amp;amp; " cm^2"
    Next
End Sub&lt;/PRE&gt;&lt;P&gt;*Not really but I have scripted two things users have said were impossible so far&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;If you can't figure out converting this to iLogic and getting it to work in an assembly I can help out more later, but for now I hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 14:57:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564414#M308168</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-15T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564787#M308169</link>
      <description>&lt;P&gt;Here is &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1041683"&gt;@pball﻿&lt;/a&gt;&amp;nbsp;code&amp;nbsp;converted to ilogic..&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    Dim oPartDoc As PartDocument
    oPartDoc = ThisApplication.ActiveDocument

    Dim oFaces As Faces
    oFaces = oPartDoc.ComponentDefinition.SurfaceBodies(1).Faces
    
    Dim Colors As Object
    Colors = CreateObject("Scripting.Dictionary")
        
    Dim oFace As Face
    For Each oFace In oFaces
         Colors(oFace.Appearance.DisplayName) = Colors(oFace.Appearance.DisplayName) + oFace.Evaluator.Area
    Next
    
    For Each Item In Colors
	MessageBox.Show("Color: " &amp;amp; Item &amp;amp; vbLf &amp;amp; "Area: " &amp;amp;Colors(Item) &amp;amp; "cm^2", "Surface Area by Color")
    Next&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 17:05:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6564787#M308169</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2016-09-15T17:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6565113#M308170</link>
      <description>&lt;P&gt;Here is the final assembly level iLogic code. You'll just have to figure out what you want to do with the final results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is pretty straight forward and is based on using the BOM. The BOM is the only way I know of to get access to every part and its quantity. I'm quite proud of this code, it's something I probably would of never done if you hadn't of asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main
    Dim oDoc As AssemblyDocument
    oDoc = ThisApplication.ActiveDocument
    
    ' Set a reference to the BOM
    Dim oBOM As BOM
    oBOM = oDoc.ComponentDefinition.BOM
    
    oBOM.StructuredViewFirstLevelOnly = False
    oBOM.StructuredViewEnabled = True

    'Set a reference to the "Structured" BOMView
    Dim oBOMView As BOMView
    oBOMView = oBOM.BOMViews.item("Structured")
    
    Dim Colors As Object
    Colors = CreateObject("Scripting.Dictionary")
    
    Call PaintRecurse(oBOMView.BOMRows, Colors)
    
    For Each item In Colors
        msg = "Paint: " &amp;amp; item &amp;amp; " Area: " &amp;amp; Colors(item) &amp;amp; " cm^2" &amp;amp; Iif(msg &amp;lt;&amp;gt; "",vbCrLf &amp;amp; msg,"")
    Next
	
    MsgBox(msg)

End Sub

Private Sub PaintRecurse(oBOMRows As BOMRowsEnumerator, Colors As Object, Optional SubQty As Integer = 1)
    On Error Resume Next
    ' Iterate through the contents of the BOM Rows.
    Dim i As Long
    For i = 1 To oBOMRows.count
        ' Get the current row.
        Dim oRow As BOMRow
        oRow = oBOMRows.item(i)
  
        'Set a reference to the primary ComponentDefinition of the row
        Dim oCompDef As ComponentDefinition
        oCompDef = oRow.ComponentDefinitions.item(1)
        
        If (oCompDef.Document.DocumentType = kPartDocumentObject) Then
            Dim oFaces As Faces
            oFaces = oCompDef.SurfaceBodies(1).Faces
        
            Dim oFace As Face
            For Each oFace In oFaces
                Colors(oFace.Appearance.DisplayName) = Colors(oFace.Appearance.DisplayName) + oFace.Evaluator.Area * oRow.ItemQuantity * SubQty
            Next
        End If

        'Recursively iterate child rows if present.
        If Not oRow.ChildRows Is Nothing Then Call PaintRecurse(oRow.ChildRows, Colors, oRow.ItemQuantity * SubQty)
    Next
End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 19:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6565113#M308170</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-15T19:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566020#M308171</link>
      <description>Thank you so much guys. You really saved my day. Just a small thing - how do I change the units from cm^2 to m^2?</description>
      <pubDate>Fri, 16 Sep 2016 07:30:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566020#M308171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-16T07:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566460#M308172</link>
      <description>&lt;P&gt;You can just multiple the cm^2 to get m^2 like so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;msg = "Paint: " &amp;amp; item &amp;amp; " Area: " &amp;amp; Colors(item)&lt;FONT color="#FF0000"&gt; * .0001&lt;/FONT&gt; &amp;amp; " &lt;FONT color="#0000FF"&gt;m^2&lt;/FONT&gt;" &amp;amp; Iif(msg &amp;lt;&amp;gt; "",vbCrLf &amp;amp; msg,"")&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 12:04:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566460#M308172</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-16T12:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566520#M308173</link>
      <description>Arh so - that makes totally sence when you see it. Final thing. How can I get the code to export it to an excel sheet? So that material in one colum and the area in another? Once again thank you very much or your support.</description>
      <pubDate>Fri, 16 Sep 2016 12:25:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566520#M308173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-16T12:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566835#M308174</link>
      <description>&lt;P&gt;Alright this exports the info to an excel file in the same folder with the same name as the assembly you run it in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm kinda jealous of iLogic since it has simple excel functions for reading and writing unlike VBA. Though there isn't a way to create a new excel with those nifty functions that I saw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also added a few additional remarks to help people know what's going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main
    Dim oDoc As AssemblyDocument
    oDoc = ThisApplication.ActiveDocument
    
    ' Set a reference to the BOM
    Dim oBOM As BOM
    oBOM = oDoc.ComponentDefinition.BOM
    
    oBOM.StructuredViewFirstLevelOnly = False
    oBOM.StructuredViewEnabled = True

    'Set a reference to the "Structured" BOMView
    Dim oBOMView As BOMView
    oBOMView = oBOM.BOMViews.item("Structured")
    &lt;BR /&gt;    'Create a dictionary to store paint color and area in
    Dim Colors As Object
    Colors = CreateObject("Scripting.Dictionary")
    &lt;BR /&gt;    'Call subroutine to calculate paint areas
    Call PaintRecurse(oBOMView.BOMRows, Colors)
    &lt;BR /&gt;    'Set output file name
    xls = Replace(ThisDoc.Document.fullfilename,".iam",".xlsx")
&lt;BR /&gt;    'Check if output file exists, if not create it
    If (Dir(xls) = "") Then
	excelApp = CreateObject("Excel.Application")
	excelWorkbook = excelApp.Workbooks.Add
	excelWorkbook.SaveAs(xls)
	excelWorkbook.Close
    End If
&lt;BR /&gt;    'Open output file for writing
    GoExcel.Open(xls, "Sheet1")&lt;BR /&gt;    'Add header info
    GoExcel.CellValue(xls, "Sheet1", "A1") = "Color"
    GoExcel.CellValue(xls, "Sheet1", "B1") = "Area"
	
    num = 2
&lt;BR /&gt;    'Loop through each color and add to the excel file
    For Each item In Colors
	GoExcel.CellValue(xls, "Sheet1", "A" &amp;amp; num) = item &lt;BR /&gt;        'Area is returned in cm^3 by default so multiply by factor to get m^3
	GoExcel.CellValue(xls, "Sheet1", "B" &amp;amp; num) = Colors(item) * .0001
	GoExcel.CellValue(xls, "Sheet1", "C" &amp;amp; num) = "m^3"
	num = num + 1
    Next
&lt;BR /&gt;    'Save and Close excel file
    GoExcel.Save
    GoExcel.Close
	
    MsgBox("Paint colors exported to " &amp;amp; xls)
End Sub

Private Sub PaintRecurse(oBOMRows As BOMRowsEnumerator, Colors As Object, Optional SubQty As Integer = 1)
    On Error Resume Next
    ' Iterate through the contents of the BOM Rows.
    Dim i As Long
    For i = 1 To oBOMRows.count
        ' Get the current row.
        Dim oRow As BOMRow
        oRow = oBOMRows.item(i)
  
        'Set a reference to the primary ComponentDefinition of the row
        Dim oCompDef As ComponentDefinition
        oCompDef = oRow.ComponentDefinitions.item(1)
        &lt;BR /&gt;        'Checks if current item is a part, skip if not a part
        If (oCompDef.Document.DocumentType = kPartDocumentObject) Then&lt;BR /&gt;            'Set a reference to the faces on the current part
            Dim oFaces As Faces
            oFaces = oCompDef.SurfaceBodies(1).Faces
&lt;BR /&gt;            'Loop through all faces of part and add the appearance and area to the dictionary
            Dim oFace As Face
            For Each oFace In oFaces
                Colors(oFace.Appearance.DisplayName) = Colors(oFace.Appearance.DisplayName) + oFace.Evaluator.Area * oRow.ItemQuantity * SubQty
            Next
        End If

        'Recursively iterate child rows if present.
        If Not oRow.ChildRows Is Nothing Then Call PaintRecurse(oRow.ChildRows, Colors, oRow.ItemQuantity * SubQty)
    Next
End Sub&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Sep 2016 14:13:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6566835#M308174</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-16T14:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716155#M308175</link>
      <description>&lt;P&gt;I was looking at this code example and I have a question. &amp;nbsp;I first ran the code with all colors the "Default" color. &amp;nbsp;It worked just fine. &amp;nbsp;I then changed one of the surfaces to "Black" and ran it again. &amp;nbsp;Now it lists the area of the "Default" surfaces as well as the area of the "Black" surfaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I removed the black surface and changed it back to the "Default" color and re-ran the code. &amp;nbsp;When I do that, the "Black" area is still listed in the excel sheet. &amp;nbsp;Is there a way to clear all the values each time it is ran?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:18:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716155#M308175</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-11-29T16:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716408#M308176</link>
      <description>&lt;P&gt;Are you deleting the excel file between running the code? The code is only updating the excel file, so if you reduce the amount of colors previous lines would be left in the file. It should be easy enough to either delete or clear the excel file if it already exists.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 17:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716408#M308176</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-11-29T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716866#M308177</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1041683"&gt;@pball&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Are you deleting the excel file between running the code? The code is only updating the excel file, so if you reduce the amount of colors previous lines would be left in the file. It should be easy enough to either delete or clear the excel file if it already exists.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, not deleting the excel between running the code. &amp;nbsp;It does say that the .xls file already exists....overwrite?( Y/N).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just thought that when it recreated the .xls file, that it would be a new file without the old colors left behind.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 20:17:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/6716866#M308177</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-11-29T20:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/9569891#M308178</link>
      <description>&lt;P&gt;I have a slightly different approach to this problem. I've written an iLogic utility that will calculate the painted area of an assembly. The general problem is that surface area of an assembly includes all faces - see example here:&amp;nbsp;&lt;A href="https://clintbrownblog.files.wordpress.com/2019/09/40clintbrown3d-autodesk-inventor-assembly-surface-area-ilogic.png?" target="_blank"&gt;https://clintbrownblog.files.wordpress.com/2019/09/40clintbrown3d-autodesk-inventor-assembly-surface-area-ilogic.png?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My iLogic utility creates a shrinkwrap of the assembly, does the surface area calc and then deletes the shrinkwrap. Surface area calcs are saved to iProperties in both mm3 and cm3&lt;/P&gt;&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fysh_W1KCA94%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dysh_W1KCA94&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fysh_W1KCA94%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="400" height="225" scrolling="no" title="Assembly Surface Areas &amp;amp; an iLogic Hack" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://clintbrown.co.uk/2019/09/28/assembly-surface-areas-for-paint-or-coatings/" target="_blank"&gt;https://clintbrown.co.uk/2019/09/28/assembly-surface-areas-for-paint-or-coatings/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:33:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/9569891#M308178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-09T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Inventor to calculate and sum up painted faces in an assembly.</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/9570546#M308179</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, you can check out similar tools at Inventor App store.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://apps.autodesk.com/INVNTOR/en/List/Search?isAppSearch=True&amp;amp;searchboxstore=INVNTOR&amp;amp;facet=&amp;amp;collection=&amp;amp;sort=&amp;amp;query=surface+area" target="_blank"&gt;https://apps.autodesk.com/INVNTOR/en/List/Search?isAppSearch=True&amp;amp;searchboxstore=INVNTOR&amp;amp;facet=&amp;amp;collection=&amp;amp;sort=&amp;amp;query=surface+area&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 21:25:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-do-i-get-inventor-to-calculate-and-sum-up-painted-faces-in/m-p/9570546#M308179</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2020-06-09T21:25:15Z</dc:date>
    </item>
  </channel>
</rss>

