<?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: IDW Parts list sorting with I logic in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765805#M379016</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well in that case, try this. (Adjust your code to suit.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will as you for the parts list you wish to sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main
'Choose the parts list, 1 is the first one placed.
oPRTL = InputBox("Choose the Parts List", "Parts List Filter", "1")

'Once done, call the sort and pass the Parts List number through.
Call Sort(oPRTL)

End Sub

Sub Sort(oPRTL)
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(oPRTL)
'Remove any "Purchesed item" filters on the parts list
oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List")
oPartsList1.Sort("COST CENTER",1,"TYPE", 1, "STOCK NUMBER", 1) ' Sort
oPartsList1.Renumber
oPartsList1.SaveItemOverridesToBOM 'Save Back the the assembly
End Sub&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 May 2019 00:56:40 GMT</pubDate>
    <dc:creator>rhasell</dc:creator>
    <dc:date>2019-05-02T00:56:40Z</dc:date>
    <item>
      <title>IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597677#M379000</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am&amp;nbsp;looking to setup an I logic rule to sort our parts list.&amp;nbsp;I would like it to be in&amp;nbsp;alpha numerical order by "part number", and&amp;nbsp;then re arrange the "item" column in numerical order from 1-20 and so on. Is there anyone&amp;nbsp;on here&amp;nbsp;who can provide me the rule for this?&amp;nbsp;I have found parts of this code online but nothing that meets this requirement. I would like to set this rule up on our active sheet template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help in this matter would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isaac Kruse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 19:35:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597677#M379000</guid>
      <dc:creator>Ikruse</dc:creator>
      <dc:date>2015-04-17T19:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597812#M379001</link>
      <description>&lt;P&gt;...So if&amp;nbsp; have this right ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) put Part numbers in numerical/alphabetical order&lt;/P&gt;
&lt;P&gt;2) Renumbers items&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I rearrange the Items, then I would lose my Numerical/Alphabetical order ...&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>Fri, 17 Apr 2015 21:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597812#M379001</guid>
      <dc:creator>mdavis22569</dc:creator>
      <dc:date>2015-04-17T21:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597860#M379002</link>
      <description>&lt;P&gt;Hi Ikruse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a quick iLogic rule that I think will meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
'use 1 to sort ascending order. 
'use 0 to sort descending order. 
oPartsList1.Sort("PART NUMBER", 1)
oPartsList1.Renumber&lt;BR /&gt;oPartsList1.SaveItemOverridesToBOM&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Related links:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.com/search/label/Sort%20Parts%20List" target="_blank"&gt;http://inventortrenches.blogspot.com/search/label/Sort%20Parts%20List&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-general-discussion/ilogic-to-sort-bom-renumber-and-sort-parts-list/td-p/3056210" target="_blank"&gt;http://forums.autodesk.com/t5/inventor-general-discussion/ilogic-to-sort-bom-renumber-and-sort-parts-list/td-p/3056210&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 22:25:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5597860#M379002</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-04-17T22:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601169#M379003</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the provided code to my template. Attached is the error I am seeing. Also I have attached a screen shot of the rule in our active template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what is wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 12:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601169#M379003</guid>
      <dc:creator>Ikruse</dc:creator>
      <dc:date>2015-04-21T12:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601457#M379004</link>
      <description>&lt;P&gt;Hi Ikruse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like the last two lines have run together. Try changing the line that reads:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;oPartsList1.RenumberoPartsList1.SaveItemOverridesToBOM&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to two lines that read:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;oPartsList1.Renumber&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;oPartsList1.SaveItemOverridesToBOM&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 15:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601457#M379004</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-04-21T15:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601470#M379005</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made the change you suggested. Here is a detailed description of the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;/P&gt;&lt;P&gt;at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)&lt;/P&gt;&lt;P&gt;at Inventor.PartsLists.get_Item(Int32 Index)&lt;/P&gt;&lt;P&gt;at LmiRuleScript.Main()&lt;/P&gt;&lt;P&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;/P&gt;&lt;P&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no parts list on the active template, could this be the problem? I have attached a view of our standard idw template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 15:26:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601470#M379005</guid>
      <dc:creator>Ikruse</dc:creator>
      <dc:date>2015-04-21T15:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601508#M379006</link>
      <description>Yes.&lt;BR /&gt;&lt;BR /&gt;Add in an if statement around your code to check that it exists ie;&lt;BR /&gt;&lt;BR /&gt;stuff that goes here.PartsLists.Count &amp;gt; 0&lt;BR /&gt;'Code in here&lt;BR /&gt;Else&lt;BR /&gt;MsgBox("No partslist found")&lt;BR /&gt;End if</description>
      <pubDate>Tue, 21 Apr 2015 15:41:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601508#M379006</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-21T15:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601510#M379007</link>
      <description>More info on the error you got (ForwardCallToInvokeMember)&lt;BR /&gt;&lt;BR /&gt;&lt;A target="_blank" href="http://coderelief.net/2011/08/20/vsto-com-exception-0x800a01a8/"&gt;http://coderelief.net/2011/08/20/vsto-com-exception-0x800a01a8/&lt;/A&gt;</description>
      <pubDate>Tue, 21 Apr 2015 15:41:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601510#M379007</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-21T15:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601518#M379008</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Ikruse wrote:&amp;nbsp; &lt;BR /&gt;
&lt;P&gt;There is no parts list on the active template, could this be the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Ikruse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yep, I think that's the issue. Here's a quick version of what I posted previously with the addtion of a TRY/CATCH.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So basically this will allow the rule to try to sort the parts list, and if one is not found, it simply returns (bails out).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&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;
&lt;PRE&gt; Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oPartsList1 As PartsList&lt;BR /&gt;
Try
   oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
 &amp;nbsp; 'use 1 to sort ascending order. 
 &amp;nbsp; 'use 0 to sort descending order. 
 &amp;nbsp; oPartsList1.Sort("PART NUMBER", 1)
 &amp;nbsp; oPartsList1.Renumber
 &amp;nbsp; oPartsList1.SaveItemOverridesToBOM
Catch
 &amp;nbsp; 'Catch error when no parts list found
 &amp;nbsp; Return
End Try&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note also, that there is still a typo, as shown:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/164943i5FC0AC8B6611A54E/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Redline.png" title="Redline.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 15:47:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601518#M379008</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-04-21T15:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601630#M379009</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It finally works. Now that it works I tested it on a new print, and it works fine. However on previously drawn prints it does not show up as a rule. Is there a way to push this to old drawings? Also is there a way to better trigger this rule such as Control+1 for example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code as of now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; oDrawDoc &lt;STRONG&gt;As&lt;/STRONG&gt; DrawingDocument oDrawDoc &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.ActiveDocument &amp;nbsp;&lt;STRONG&gt;Dim&lt;/STRONG&gt; oPartsList1 &lt;STRONG&gt;As&lt;/STRONG&gt; PartsList&lt;STRONG&gt;Try&lt;/STRONG&gt; oPartsList1 &lt;STRONG&gt;=&lt;/STRONG&gt; oDrawDoc.&lt;STRONG&gt;ActiveSheet&lt;/STRONG&gt;.PartsLists.Item&lt;STRONG&gt;(1)&lt;/STRONG&gt;oPartsList1.Sort&lt;STRONG&gt;(&lt;/STRONG&gt;"PART NUMBER", &lt;STRONG&gt;1)&lt;/STRONG&gt; oPartsList1.Renumber&amp;nbsp;&amp;nbsp; oPartsList1.SaveItemOverridesToBOM&lt;STRONG&gt;Catch&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Return&lt;/STRONG&gt; &lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;Try&lt;/STRONG&gt;trigger &lt;STRONG&gt;=&lt;/STRONG&gt; iTrigger0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any training videos I could buy to learn more about I logic? Or any online classes or books?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help thus far! Looking forward to your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 16:55:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601630#M379009</guid>
      <dc:creator>Ikruse</dc:creator>
      <dc:date>2015-04-21T16:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601647#M379010</link>
      <description>&lt;P&gt;Hi Ikruse,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest creating this iLogic rule as an external rule, an then using the&amp;nbsp;Before Save Document event trigger to automatically run the rule anytime the file is saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iLogic External Rules:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html" target="_blank"&gt;http://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iLogic Event Triggers:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-9369AEB8-F01A-4865-812D-14B21AA4AA22" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-9369AEB8-F01A-4865-812D-14B21AA4AA22&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ilogic Information and tutorials :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-BEBDED71-ED75-4329-ADBA-2E5DDCCF8DE8" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-BEBDED71-ED75-4329-ADBA-2E5DDCCF8DE8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-2B4A8270-D1F5-4CF7-BEB3-7B12E9CF78F3" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-2B4A8270-D1F5-4CF7-BEB3-7B12E9CF78F3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-9BAF2360-FC00-499C-A710-9D7988B2CFFB" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2014/ENU/?guid=GUID-9BAF2360-FC00-499C-A710-9D7988B2CFFB&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is some information on the Inventor API here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.com/2013/10/ilogic-how-to-learn-inventors.html?utm_source=BP_recent" target="_blank"&gt;http://inventortrenches.blogspot.com/2013/10/ilogic-how-to-learn-inventors.html?utm_source=BP_recent&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 17:13:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/5601647#M379010</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-04-21T17:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8763967#M379011</link>
      <description>&lt;P&gt;Hi , I have tried the codes. It does not give the error but it is not sorting my part list. I like to sort part list alphanumerically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 06:56:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8763967#M379011</guid>
      <dc:creator>ankurGCK9S</dc:creator>
      <dc:date>2019-05-01T06:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765462#M379012</link>
      <description>&lt;P&gt;Hi! What release of Inventor are you on? If you are on 2017 and later, the alpha sort should be available in the Sort dialog in the PartsList. Edit the PartsList -&amp;gt; click on Sort -&amp;gt; expand the dialog -&amp;gt; select "Sort by string." Please try it and see if it works for you.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 20:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765462#M379012</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2019-05-01T20:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765589#M379013</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #666666; font-family: 'Artifakt',Tahoma,Helvetica,Arial,sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Johnson ,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #666666; font-family: 'Artifakt',Tahoma,Helvetica,Arial,sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;thank you for the reply . I am on &amp;nbsp; 2019, however I like to sort the partlist with illogic (Link with trigger on save or something else ) the BOM as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 21:26:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765589#M379013</guid>
      <dc:creator>ankurGCK9S</dc:creator>
      <dc:date>2019-05-01T21:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765727#M379014</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;The only reasons the code wont work are due to the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- There is a typo in your code&lt;/P&gt;
&lt;P&gt;- Your parts list does not contain a column of 'PART NUMBER"&lt;/P&gt;
&lt;P&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; example of mine:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: #800000;"&gt;oPartsList1&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Sort&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"COST CENTER"&lt;/SPAN&gt;,1,&lt;SPAN style="color: #008080;"&gt;"TYPE"&lt;/SPAN&gt;, 1, &lt;SPAN style="color: #008080;"&gt;"STOCK NUMBER"&lt;/SPAN&gt;, 1)&lt;/PRE&gt;
&lt;P&gt;- There is more than one Parts List on your drawing, the code will sort the first parts list on your drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN style="color: #800000;"&gt;oPartsList1&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ActiveSheet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Item&lt;/SPAN&gt;(1)&lt;/P&gt;
&lt;P&gt;Change the (1) as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than that, the code should work as expected.&lt;/P&gt;
&lt;P&gt;Can you share some additional information so that we can get it resolved.&lt;/P&gt;
&lt;P&gt;Perhaps a dummy drawing with a parts list, or some screen captures of your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 23:41:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765727#M379014</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-05-01T23:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765793#M379015</link>
      <description>&lt;P&gt;Thanks for the reply&amp;nbsp; . I have fix the code with correct name and it works perfectly.&amp;nbsp; I use multiple part lists in the drawing. for example&amp;nbsp; - showing pipe lengths , or connection point between two drawings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have copy the same rule to sort as per the CN#&amp;nbsp; in the second part list and it works ok . I am guessing sequence number of partlist is depend on the sequence of creation of the part list in the drawing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now Is there any way that I can hide certain rows in the part list if it contain certain string !! for example , In the attached screen shot , on the first part list&amp;nbsp; (Bottom RHS) I am hiding&amp;nbsp; all the CN# , while on the second part list (ont top side)&amp;nbsp; I am hiding all the rows except CN# . it is tedious task specially when you add something in the assembly and forget to hide or show!!&amp;nbsp; hope I have not make too much confusing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 00:45:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765793#M379015</guid>
      <dc:creator>ankurGCK9S</dc:creator>
      <dc:date>2019-05-02T00:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765805#M379016</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well in that case, try this. (Adjust your code to suit.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will as you for the parts list you wish to sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main
'Choose the parts list, 1 is the first one placed.
oPRTL = InputBox("Choose the Parts List", "Parts List Filter", "1")

'Once done, call the sort and pass the Parts List number through.
Call Sort(oPRTL)

End Sub

Sub Sort(oPRTL)
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(oPRTL)
'Remove any "Purchesed item" filters on the parts list
oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List")
oPartsList1.Sort("COST CENTER",1,"TYPE", 1, "STOCK NUMBER", 1) ' Sort
oPartsList1.Renumber
oPartsList1.SaveItemOverridesToBOM 'Save Back the the assembly
End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 00:56:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765805#M379016</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-05-02T00:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765809#M379017</link>
      <description>&lt;P&gt;I have just written some code to step though the parts list and look for a keyword.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mine expands the list, so I will have to look a little to see if I can change the behavior to change the visibility of items.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can share the code, if you are willing to debug it and change it to suit your environment?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 01:00:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765809#M379017</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-05-02T01:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765821#M379018</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this. I have modified my code to suit, I tested it and it works. You should be able to adjust the variables as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might not need the row counter, my previous code changes the size of the parts list, so it had to update real-time to accommodate the increase in size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
'Title: Parts List Row visibily
'Date: 02/05/2019
'Reg Hasell
'This rule checks the Parts List sequence number
'Looks for as set string E.G. "PLATE"
'If found, it will hide the Parts list row
'This will continue untill the entire parts list has been exposed.
'Caveat:
'I am unable to expand the parts list. This must be done manually.
'--oOo--
'Get the Parts list Sequence Number
oPRTL = InputBox("Choose the Parts List", "Parts List Filter", "1")
'Once done, call the sort and pass the Parts List number through.
Call oQTY(oPRTL)
End Sub
'--------------------------------
Sub oQTY(oPRTL)
	'On Error Resume Next
	' Set a reference to the drawing document.
	' This assumes a drawing document is active.
	Dim oDrawDoc As DrawingDocument
	oDrawDoc = ThisApplication.ActiveDocument
	Dim oPartList As PartsList
	'''---------------------
	' Set a reference to the first parts list on the active sheet.
	'Dim oPartList As PartsList
	'expand the parts list
	oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(oPRTL)
	' Iterate through the contents of the parts list.
	Dim i As Long
	Dim oRow As PartsListRow
	'Start counting the parts list rows
	'as the parts list grows due to expansion, the row counter will increase.
	Dim FirstRowCount As Integer = oPartList.PartsListRows.Count
	Dim LastRowCount As Integer = 0
	'
	Do Until FirstRowCount = LastRowCount
		FirstRowCount = oPartList.PartsListRows.Count ' Included in the loop.
		For i = 1 To oPartList.PartsListRows.Count
			'look for the cell titled "Description"
			'oCell = oPartList.PartsListRows.Item(i).Item("DESCRIPTION")
			oCell = oPartList.PartsListRows.Item(i).Item("TYPE")
			'oCell2  = oPartList.PartsListRows.Item(i).Item("LENGTH") ' left this for possible later use.

			Try
				If oCell.Value = "PLATE" Or oCell.Value = "plate" Then
					'oPartList.PartsListRows.Item(i).Expanded = True
					oPartList.PartsListRows.Item(i).Visible = False
					End If
			Catch ex As Exception
			End Try
		Next
		'Count the new size of the Parts List
		LastRowCount = oPartList.PartsListRows.Count
	Loop

	MessageBox.Show("All Done", "BOM QTY")
	'End Sub 'Added the repeat for multiple parts lists
	oAgain = MessageBox.Show("Again", "Rinse and Repeat", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) 'Added rev2
	If oAgain = vbYes
		AGAIN
	End If
End Sub

Sub AGAIN
	Main
End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 01:16:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765821#M379018</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-05-02T01:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: IDW Parts list sorting with I logic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765924#M379019</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for providing codes . I have changed to my requirement works however it work only if string specified in rule meets exactly to the part list . For my case there are several CN numbers , CN-1 to CN50. I want to hide all raws which part number contain CN.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have done below changes in your codes . May be I am thinking to add custom property for CNs and use it to hide the rows. After that hide that property manually from part list . Do you know the code to hide the part list coloum ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'&lt;BR /&gt;Do Until FirstRowCount = LastRowCount&lt;BR /&gt;FirstRowCount = oPartList.PartsListRows.Count ' Included in the loop.&lt;BR /&gt;For i = 1 To oPartList.PartsListRows.Count&lt;BR /&gt;'look for the cell titled "PART No."&lt;BR /&gt;oCell = oPartList.PartsListRows.Item(i).Item("PART No.")&lt;/P&gt;
&lt;P&gt;Try&lt;BR /&gt;If oCell.Value = "CN-18" Or oCell.Value = "cn-18" Then&lt;BR /&gt;'oPartList.PartsListRows.Item(i).Expanded = True&lt;BR /&gt;oPartList.PartsListRows.Item(i).Visible = False&lt;BR /&gt;End If&lt;BR /&gt;Catch ex As Exception&lt;BR /&gt;End Try&lt;BR /&gt;Next&lt;BR /&gt;'Count the new size of the Parts List&lt;BR /&gt;LastRowCount = oPartList.PartsListRows.Count&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 04:03:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/idw-parts-list-sorting-with-i-logic/m-p/8765924#M379019</guid>
      <dc:creator>ankurGCK9S</dc:creator>
      <dc:date>2019-05-02T04:03:21Z</dc:date>
    </item>
  </channel>
</rss>

