<?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: LevelOfDetailRepresentation in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5591220#M55285</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Programming/API help there is an example about how to traverse an assembly. I think that's what you need to add to your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I paste it below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traverse an Assembly API Sample&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;Public Sub AssemblyCount()
    &lt;SPAN&gt;' Set reference to active document.&lt;/SPAN&gt;
    &lt;SPAN&gt;' This assumes the active document is an &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt;&lt;/SPAN&gt;
    Dim oDoc As Inventor.AssemblyDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    &lt;SPAN&gt;' Get &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt; component definition&lt;/SPAN&gt;
    Dim oCompDef As Inventor.ComponentDefinition
    Set oCompDef = oDoc.ComponentDefinition

    Dim sMsg As String
    Dim iLeafNodes As Long
    Dim iSubAssemblies As Long
    
    &lt;SPAN&gt;' Get all occurrences from component definition for &lt;FONT color="#ffffff"&gt;Assembly&lt;/FONT&gt; document&lt;/SPAN&gt;
    Dim oCompOcc As ComponentOccurrence
    For Each oCompOcc In oCompDef.Occurrences
        &lt;SPAN&gt;' Check if it's child occurrence (leaf node)&lt;/SPAN&gt;
        If oCompOcc.SubOccurrences.Count = 0 Then
            Debug.Print oCompOcc.Name
            iLeafNodes = iLeafNodes + 1
        Else
            Debug.Print oCompOcc.Name
            iSubAssemblies = iSubAssemblies + 1
            Call processAllSubOcc(oCompOcc, _
                                sMsg, _
                                iLeafNodes, _
                                iSubAssemblies) &lt;SPAN&gt;' subassembly&lt;/SPAN&gt;
        End If
    Next
    
    Debug.Print "No of leaf nodes    : " + CStr(iLeafNodes)
    Debug.Print "No of sub &lt;FONT color="#ffffff"&gt;assemblies&lt;/FONT&gt;: " + CStr(iSubAssemblies)
End Sub

&lt;SPAN&gt;' This function is called for processing sub &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt;.  It is called recursively&lt;/SPAN&gt;
&lt;SPAN&gt;' to iterate through the entire &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt; tree.&lt;/SPAN&gt;
Private Sub processAllSubOcc(ByVal oCompOcc As ComponentOccurrence, _
                             ByRef sMsg As String, _
                             ByRef iLeafNodes As Long, _
                             ByRef iSubAssemblies As Long)
    
    Dim oSubCompOcc As ComponentOccurrence
    For Each oSubCompOcc In oCompOcc.SubOccurrences
        &lt;SPAN&gt;' Check if it's child occurrence (leaf node)&lt;/SPAN&gt;
        If oSubCompOcc.SubOccurrences.Count = 0 Then
            Debug.Print oSubCompOcc.Name
            iLeafNodes = iLeafNodes + 1
        Else
            sMsg = sMsg + oSubCompOcc.Name + vbCr
            iSubAssemblies = iSubAssemblies + 1

            Call processAllSubOcc(oSubCompOcc, _
                                  sMsg, _
                                  iLeafNodes, _
                                  iSubAssemblies)
        End If
    Next
End Sub&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that's what you need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2015 12:15:25 GMT</pubDate>
    <dc:creator>RodrigoEiras</dc:creator>
    <dc:date>2015-04-14T12:15:25Z</dc:date>
    <item>
      <title>LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5579567#M55223</link>
      <description>&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a possibility to list all parts, assemblies&amp;nbsp;and subassemblies which are suppressed by a LevelOfDetailRepresentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works for an assembly without subassemblies:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim asm As AssemblyDocument&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm = m_inventorApplication.ActiveDocument&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim acd As AssemblyComponentDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acd = asm.ComponentDefinition&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rm As RepresentationsManager&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm = acd.RepresentationsManager&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim nvm As NameValueMap&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nvm = m_inventorApplication.TransientObjects.CreateNameValueMap()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim doc As AssemblyDocument&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim occ As ComponentOccurrence&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox1.Items.Clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox2.Items.Clear()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim lod As LevelOfDetailRepresentation&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each lod In rm.LevelOfDetailRepresentations&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox1.Items.Add(lod.Name)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox2.Items.Add(lod.Name)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call nvm.Add("LevelOfDetailRepresentation", lod.Name)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc = m_inventorApplication.Documents.OpenWithOptions(asm.FullFileName, nvm, False)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call nvm.Clear()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each occ In doc.ComponentDefinition.Occurrences&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If occ.Suppressed = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox2.Items.Add("&amp;nbsp;&amp;nbsp;&amp;nbsp; " + occ.Name + " Suppressed = " + Str(occ.Suppressed))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox1.Items.Add("&amp;nbsp;&amp;nbsp;&amp;nbsp; " + occ.Name + " Suppressed = " + Str(occ.Suppressed))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Don't forget to close the document not used anymore&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not lod Is rm.ActiveLevelOfDetailRepresentation Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call doc.Close(True)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2015 11:50:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5579567#M55223</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2015-04-10T11:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5581075#M55236</link>
      <description>This is only going to work for the top level of the active document as you dont have anywhere in your program that tells it to go any deeper.</description>
      <pubDate>Fri, 10 Apr 2015 18:25:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5581075#M55236</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-10T18:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5590658#M55281</link>
      <description>&lt;P&gt;Hello Justin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please could you help me? How could I get the suppressed parts and assemblies from subassemblies?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Georg&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 06:13:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5590658#M55281</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2015-04-14T06:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5591220#M55285</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Programming/API help there is an example about how to traverse an assembly. I think that's what you need to add to your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I paste it below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traverse an Assembly API Sample&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;Public Sub AssemblyCount()
    &lt;SPAN&gt;' Set reference to active document.&lt;/SPAN&gt;
    &lt;SPAN&gt;' This assumes the active document is an &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt;&lt;/SPAN&gt;
    Dim oDoc As Inventor.AssemblyDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    &lt;SPAN&gt;' Get &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt; component definition&lt;/SPAN&gt;
    Dim oCompDef As Inventor.ComponentDefinition
    Set oCompDef = oDoc.ComponentDefinition

    Dim sMsg As String
    Dim iLeafNodes As Long
    Dim iSubAssemblies As Long
    
    &lt;SPAN&gt;' Get all occurrences from component definition for &lt;FONT color="#ffffff"&gt;Assembly&lt;/FONT&gt; document&lt;/SPAN&gt;
    Dim oCompOcc As ComponentOccurrence
    For Each oCompOcc In oCompDef.Occurrences
        &lt;SPAN&gt;' Check if it's child occurrence (leaf node)&lt;/SPAN&gt;
        If oCompOcc.SubOccurrences.Count = 0 Then
            Debug.Print oCompOcc.Name
            iLeafNodes = iLeafNodes + 1
        Else
            Debug.Print oCompOcc.Name
            iSubAssemblies = iSubAssemblies + 1
            Call processAllSubOcc(oCompOcc, _
                                sMsg, _
                                iLeafNodes, _
                                iSubAssemblies) &lt;SPAN&gt;' subassembly&lt;/SPAN&gt;
        End If
    Next
    
    Debug.Print "No of leaf nodes    : " + CStr(iLeafNodes)
    Debug.Print "No of sub &lt;FONT color="#ffffff"&gt;assemblies&lt;/FONT&gt;: " + CStr(iSubAssemblies)
End Sub

&lt;SPAN&gt;' This function is called for processing sub &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt;.  It is called recursively&lt;/SPAN&gt;
&lt;SPAN&gt;' to iterate through the entire &lt;FONT color="#ffffff"&gt;assembly&lt;/FONT&gt; tree.&lt;/SPAN&gt;
Private Sub processAllSubOcc(ByVal oCompOcc As ComponentOccurrence, _
                             ByRef sMsg As String, _
                             ByRef iLeafNodes As Long, _
                             ByRef iSubAssemblies As Long)
    
    Dim oSubCompOcc As ComponentOccurrence
    For Each oSubCompOcc In oCompOcc.SubOccurrences
        &lt;SPAN&gt;' Check if it's child occurrence (leaf node)&lt;/SPAN&gt;
        If oSubCompOcc.SubOccurrences.Count = 0 Then
            Debug.Print oSubCompOcc.Name
            iLeafNodes = iLeafNodes + 1
        Else
            sMsg = sMsg + oSubCompOcc.Name + vbCr
            iSubAssemblies = iSubAssemblies + 1

            Call processAllSubOcc(oSubCompOcc, _
                                  sMsg, _
                                  iLeafNodes, _
                                  iSubAssemblies)
        End If
    Next
End Sub&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that's what you need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 12:15:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5591220#M55285</guid>
      <dc:creator>RodrigoEiras</dc:creator>
      <dc:date>2015-04-14T12:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599388#M55422</link>
      <description>&lt;P&gt;Hello Rodrigo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for the code. The problem is to get the dependent representations from the main assembly and loop than througt the assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main.iam -&amp;gt; LOD1 ; LOD2 ; LOD3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUB1.iam -&amp;gt; LOD1 ; LOD2 ; LOD3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUB2.iam -&amp;gt; LOD1 ; LOD2 ; LOD3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 08:29:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599388#M55422</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2015-04-20T08:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599442#M55425</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Georg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that the difficulty lies in trying to get the LODs from the subassemblies, as you cannot do it from the ComponentOcurrence, but probably you would have to access each subassembly individually to be able to use the RepresentationsManager object and get the LODs.&lt;/P&gt;&lt;P&gt;Unfortunately I am not so experienced in this kind of programming with assemblies, so I am afraid I cannot help you further with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 09:27:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599442#M55425</guid>
      <dc:creator>RodrigoEiras</dc:creator>
      <dc:date>2015-04-20T09:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599774#M55430</link>
      <description>&lt;P&gt;I could see this getting pretty interesting depending on how things are suppressed as if you suppress components in a lower level, it will make it a temporary level of detail, thus you will have to search through those to access parts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might have an easier time just listing all suppressed parts for the current state of the top-level assembly document, by ignoring the level of detail aspect completely and just testing suppression status.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise, I would say you will definitiely need to look into the RepresentationsManager.LevelofDetailRepresentations methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at all of the methods under Level Of Detail representations, the most use it will be for you is to establish what LOD you are looking at, and chaning/traversing them. They dont contain any information about the suppression status of components, only the substitute parts that may be used instead.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 14:02:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599774#M55430</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-20T14:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599978#M55440</link>
      <description>&lt;P&gt;I've slightly changed the code of thr "&lt;SPAN&gt;Traverse an Assembly API Sample".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now it prints names of suppressed components ignoring substitutes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You may extend this code to loop through every LOD in your top assembly document.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;Public Sub AssemblyCount()
    ' Set reference to active document.
    ' This assumes the active document is an assembly
    Dim oDoc As Inventor.AssemblyDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    ' Get assembly component definition
    Dim oCompDef As Inventor.ComponentDefinition
    Set oCompDef = oDoc.ComponentDefinition

    Dim sMsg As String
    Dim iLeafNodes As Long
    Dim iSubAssemblies As Long
    
    ' Get all occurrences from component definition for Assembly document
    Dim oCompOcc As ComponentOccurrence
    
    Debug.Print "--- Assembly: " &amp;amp; oDoc.DisplayName
    For Each oCompOcc In oCompDef.Occurrences
        If Not oCompOcc.IsSubstituteOccurrence Then
            If oCompOcc.Suppressed Then
                Debug.Print "suppressed:  " &amp;amp; oCompOcc.Name
                iLeafNodes = iLeafNodes + 1
            Else
                ' Check if it's child occurrence (leaf node)
                If oCompOcc.SubOccurrences.Count = 0 Then
                    'empty SubAssembly - do nothing
                Else
                    iSubAssemblies = iSubAssemblies + 1
                    Call processAllSubOcc(oCompOcc, _
                                        sMsg, _
                                        iLeafNodes, _
                                        iSubAssemblies) ' subassembly
                End If
            End If
        End If
    Next
    
    Debug.Print
    Debug.Print "No of suppressed nodes : " + CStr(iLeafNodes)
    Debug.Print "No of sub assemblies   : " + CStr(iSubAssemblies)
End Sub

' This function is called for processing sub assembly.  It is called recursively
' to iterate through the entire assembly tree.
Private Sub processAllSubOcc(ByVal oCompOcc As ComponentOccurrence, _
                             ByRef sMsg As String, _
                             ByRef iLeafNodes As Long, _
                             ByRef iSubAssemblies As Long)
    
    Dim oSubCompOcc As ComponentOccurrence
    Debug.Print "--- SubAssembly: " &amp;amp; oCompOcc.Name
    
    For Each oSubCompOcc In oCompOcc.SubOccurrences
        If Not oSubCompOcc.IsSubstituteOccurrence Then
            If oSubCompOcc.Suppressed Then
                Debug.Print "suppressed:  " &amp;amp; oSubCompOcc.Name
                iLeafNodes = iLeafNodes + 1
            Else
                ' Check if it's child occurrence (leaf node)
                If oSubCompOcc.SubOccurrences.Count = 0 Then
                    'empty SubAssembly - do nothing
                Else
                    sMsg = sMsg + oSubCompOcc.Name + vbCr
                    iSubAssemblies = iSubAssemblies + 1
        
                    Call processAllSubOcc(oSubCompOcc, _
                                          sMsg, _
                                          iLeafNodes, _
                                          iSubAssemblies)
                End If
            End If
        End If
    Next
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 15:47:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5599978#M55440</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2015-04-20T15:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5600758#M55445</link>
      <description>&lt;P&gt;Hello Vladimir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 06:02:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5600758#M55445</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2015-04-21T06:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964774#M60601</link>
      <description>&lt;P&gt;hi&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me&amp;nbsp; for &amp;nbsp;total Item QTY&lt;/P&gt;&lt;P&gt;&lt;IMG title="Adsız.jpg" alt="Adsız.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/208434i071DA67C4E780724/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2015 09:18:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964774#M60601</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2015-12-25T09:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964783#M60602</link>
      <description>&lt;P&gt;Try this sample please:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;

&lt;PRE&gt;Sub BOM_Qty_Test()
    Dim oAsmDoc As AssemblyDocument
    Set oAsmDoc = ThisApplication.ActiveDocument
    
    Dim oBOM As BOM
    Set oBOM = oAsmDoc.ComponentDefinition.BOM
    
    oBOM.StructuredViewEnabled = True
    oBOM.StructuredViewFirstLevelOnly = True
    
    Dim oBOMView As BOMView
    Set oBOMView = oBOM.BOMViews.Item("Structured")  'Structured
    
    Dim oBOMRow As BOMRow
    Dim TotalQty As Double
    TotalQty = 0
    
    For Each oBOMRow In oBOMView.BOMRows
        TotalQty = TotalQty + oBOMRow.TotalQuantity
        Debug.Print "ItemNumber = " &amp;amp; oBOMRow.ItemNumber &amp;amp; "    Qty = " &amp;amp; oBOMRow.TotalQuantity
    Next
    Debug.Print "Total Qty = " &amp;amp; TotalQty
    
    Beep
End Sub&lt;/PRE&gt;
&lt;P&gt;BOMRow.TotalQuantityOverridden Boolean property could help you to detect if the&amp;nbsp;TotalQuantity property has been overridden.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2015 10:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964783#M60602</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2015-12-25T10:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964814#M60603</link>
      <description>hi Vladimir&lt;BR /&gt;Thanks for answer but ı need total ItemQTY (sum ItemQTY) in BOM&lt;BR /&gt;not Total QTY&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Dec 2015 11:40:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964814#M60603</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2015-12-25T11:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964910#M60606</link>
      <description>&lt;P&gt;Then use&amp;nbsp;BOMRow.ItemQuantity property.&lt;BR /&gt;You may look at the&amp;nbsp;BOMQuery vba sample from the Inventor API Help.&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2015 18:27:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5964910#M60606</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2015-12-25T18:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5966171#M60616</link>
      <description>thanks&lt;BR /&gt;its ok</description>
      <pubDate>Mon, 28 Dec 2015 13:13:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5966171#M60616</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2015-12-28T13:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5979181#M60755</link>
      <description>&lt;P&gt;thanks&amp;nbsp; for your help..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can ı another quession?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do &amp;nbsp; "user parameter"&amp;nbsp; = Base Quantity&amp;nbsp; in part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 09:48:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5979181#M60755</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2016-01-08T09:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5980447#M60789</link>
      <description>&lt;P&gt;Look at the following post: &amp;nbsp;&lt;STRONG&gt;Use iLogic to Change Base Quantity&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/use-ilogic-to-change-base-quantity/m-p/3222896/highlight/true#M36747" target="_self"&gt;http://forums.autodesk.com/t5/inventor-customization/use-ilogic-to-change-base-quantity/m-p/3222896/highlight/true#M36747&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See Inventor API Help for the BOMQuantity.GetBaseQuantity method. &amp;nbsp;It allows to retrieve the base quantity for the part. &amp;nbsp;If the first argument is BOMQuantityTypeEnum.kParameterBOMQuantity then the second argument returns the parameter object.&amp;nbsp; You can get parameter&amp;nbsp;name to use it in your rule.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 21:42:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5980447#M60789</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2016-01-08T21:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5981948#M60808</link>
      <description>&lt;DIV class="tw-swapa"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="_Ejb"&gt;&lt;DIV&gt;&lt;DIV class="tw-ta-container tw-nfl"&gt;&lt;DIV class="tw-swapa"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="_Ejb"&gt;&lt;DIV&gt;&lt;DIV class="tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I want to use this way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iProperties.Value("Custom", "HAMMADDE MALİYET") = (iProperties.Value("Custom", "HAMMADDE KODU"))*&lt;FONT color="#ff0000"&gt;(BaseQuantity)*&lt;/FONT&gt;1.05&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 07:00:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5981948#M60808</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2016-01-11T07:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: LevelOfDetailRepresentation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5990251#M60943</link>
      <description>&lt;P&gt;Can you help me this&amp;nbsp; topic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;" I want to use this way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iProperties.Value("Custom", "HAMMADDE MALİYET") = (iProperties.Value("Custom", "HAMMADDE KODU"))*&lt;FONT color="#ff0000"&gt;(BaseQuantity)*&lt;/FONT&gt;1.05&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/levelofdetailrepresentation/m-p/5990251#M60943</guid>
      <dc:creator>arge</dc:creator>
      <dc:date>2016-01-15T07:04:18Z</dc:date>
    </item>
  </channel>
</rss>

