<?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 Ilogic: Filter Parts list by item range in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13217721#M174926</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you assist me with filtering a parts list in number range. I found the below link that explains it but I just don't know how to define the range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartsListFilterSettings_Add" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartsListFilterSettings_Add&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't find any examples online&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;PRE&gt;		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(2).&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oGADrawingView&lt;/SPAN&gt;, &lt;SPAN&gt;oPlacementPoint&lt;/SPAN&gt;, &lt;SPAN&gt;PartsListLevelEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kStructuredAllLevels&lt;/SPAN&gt;)
		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(2).&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt;.&lt;SPAN&gt;Style&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListStyles&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"AK Parts List (ANSI)"&lt;/SPAN&gt;)  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it should be something like this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oPartsListMAN = oDrawingDoc.Sheets(2).PartsLists.Add(PartsListFilterItemTypeEnum.kItemNumberRangeFilterItem, 1 - 5)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;</description>
    <pubDate>Wed, 18 Dec 2024 08:15:05 GMT</pubDate>
    <dc:creator>RainerXGE3N</dc:creator>
    <dc:date>2024-12-18T08:15:05Z</dc:date>
    <item>
      <title>Ilogic: Filter Parts list by item range</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13217721#M174926</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you assist me with filtering a parts list in number range. I found the below link that explains it but I just don't know how to define the range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartsListFilterSettings_Add" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartsListFilterSettings_Add&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't find any examples online&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;PRE&gt;		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(2).&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oGADrawingView&lt;/SPAN&gt;, &lt;SPAN&gt;oPlacementPoint&lt;/SPAN&gt;, &lt;SPAN&gt;PartsListLevelEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kStructuredAllLevels&lt;/SPAN&gt;)
		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(2).&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
		&lt;SPAN&gt;oPartsListMAN&lt;/SPAN&gt;.&lt;SPAN&gt;Style&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListStyles&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"AK Parts List (ANSI)"&lt;/SPAN&gt;)  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it should be something like this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oPartsListMAN = oDrawingDoc.Sheets(2).PartsLists.Add(PartsListFilterItemTypeEnum.kItemNumberRangeFilterItem, 1 - 5)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 08:15:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13217721#M174926</guid>
      <dc:creator>RainerXGE3N</dc:creator>
      <dc:date>2024-12-18T08:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic: Filter Parts list by item range</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13219242#M174946</link>
      <description>&lt;P&gt;This example show how to use the function. It will put a filter on 1e partslist of the active sheet.&lt;/P&gt;
&lt;P&gt;Its also good to know that this function is only availible on inventor 2024.1 and later.&lt;/P&gt;
&lt;P&gt;Also If the same type filter already exists, it returns an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim sheet As Sheet = ThisApplication.ActiveDocument.ActiveSheet
Dim partsList = sheet.PartsLists.Item(1)

Try
    Dim options = ThisApplication.TransientObjects.CreateNameValueMap()
    options.Add("ItemNumberRange", "1-5")
    partsList.FilterSettings.Add(PartsListFilterItemTypeEnum.kItemNumberRangeFilterItem, options)
Catch ex As Exception
    MsgBox("Could not set the filter. Maybe it was already set?")
End Try&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 18 Dec 2024 21:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13219242#M174946</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-12-18T21:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic: Filter Parts list by item range</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13219730#M174949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked perfectly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 05:25:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-filter-parts-list-by-item-range/m-p/13219730#M174949</guid>
      <dc:creator>RainerXGE3N</dc:creator>
      <dc:date>2024-12-19T05:25:21Z</dc:date>
    </item>
  </channel>
</rss>

