<?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: iLogic to Change Drawing's Part List Style in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9106096#M102444</link>
    <description>&lt;P&gt;Thanks rhasell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I add a multilist? Seems like iLogic only has a limited input boxes&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 13:21:26 GMT</pubDate>
    <dc:creator>felix.cortes5K3Y2</dc:creator>
    <dc:date>2019-10-24T13:21:26Z</dc:date>
    <item>
      <title>iLogic to Change Drawing's Part List Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9104603#M102413</link>
      <description>&lt;P&gt;Hi Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two different Part List Styles that I use on my drawings and I am trying to write a code to switch in between them. Lets say I have a Part List Style named as "Style One" and "Style Two". Here's what I got so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsList&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;.&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;(1)
&lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;Style&lt;/SPAN&gt;() = &lt;SPAN&gt;"Style Two"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code doesn't seem to work. Anyone have an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;- Felix Cortes&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:42:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9104603#M102413</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-10-23T21:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Change Drawing's Part List Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9104785#M102418</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;Once you have got it working, expand the code to include a multivalue list, allowing a wider selection.&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
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
			oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item(&lt;FONT color="#FF0000"&gt;"Style Two"&lt;/FONT&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 23:43:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9104785#M102418</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-10-23T23:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Change Drawing's Part List Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9106096#M102444</link>
      <description>&lt;P&gt;Thanks rhasell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I add a multilist? Seems like iLogic only has a limited input boxes&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 13:21:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9106096#M102444</guid>
      <dc:creator>felix.cortes5K3Y2</dc:creator>
      <dc:date>2019-10-24T13:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to Change Drawing's Part List Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9107485#M102461</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a copy of my code.&lt;/P&gt;&lt;P&gt;You will need to create a parts list style for each configuration.&lt;/P&gt;&lt;P&gt;The code is not triggered, so it has to be run after a change is made.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Apply Parts List Filter
'Created 17/07/2017
'PRTL = Parts List
'Reg Hasell

Sub Main
	'Choose the parts list, 1 is the first one placed.
	oPRTL = InputBox("Choose the Parts List", "Parts List Filter", "1")

	'Create a multi value list if not there.
	Call Create_Params()
	Call ApplyFilter(oPRTL)

End Sub

Sub Create_Params()
	' Get the UserParameters collection
	Dim userParams As UserParameters
	userParams = ThisDoc.Document.Parameters.UserParameters
	'check for parameter and create if not found
	Try
		oPartslist = Parameter("Parts_List")
	Catch
		'multi-value text parameter
		userParams.AddByValue("Parts_List", "ALL", UnitsTypeEnum.kTextUnits)
		'Option of two types, this is also present in the Global Form
		MultiValue.SetList("Parts_List", "ALL", "No_Fasteners", "Fasteners_Only")
	End Try
	Parameter.Param("Parts_List").IsKey​ = True
End Sub

Sub ApplyFilter(oPRTL)
	On Error Resume Next
	Dim oDrawDoc As DrawingDocument
	oDrawDoc = ThisApplication.ActiveDocument

	Dim oPartsList1 As PartsList
	oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(oPRTL)
	oPartslist = Parameter("Parts_List")
	If oPartslist = "ALL"
		oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List")
	Else If oPartslist = "No_Fasteners"
	oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List-NoFasteners")
	Else If oPartslist = "Fasteners_Only"
	oPartsList1.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List-Fasteners")
	End If
End Sub&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Oct 2019 00:07:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-change-drawing-s-part-list-style/m-p/9107485#M102461</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-10-25T00:07:36Z</dc:date>
    </item>
  </channel>
</rss>

