<?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 Multivariable Parameter Creation Rule in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5947950#M347982</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi DavidBapst,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To set the parameter as a key you can add this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Parameter.Param("Color").IsKey​ = True&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the other question, I assume you're talking about in the Form Editor? If so, I don't know of a way to sort or re-order, but you can filter for keys:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Autodesk Inventor iLogic Form Key Parameters.png" alt="Autodesk Inventor iLogic Form Key Parameters.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/206188i912D0A30AEFE595F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you mean in the Parameters Editor you can click the header to sort, and use the filter button to filter for only Keys:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Autodesk Inventor iLogic Form Key Parameters2.png" alt="Autodesk Inventor iLogic Form Key Parameters2.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/206189i099CA656EE71AE85/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&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, 11 Dec 2015 17:51:28 GMT</pubDate>
    <dc:creator>Curtis_W</dc:creator>
    <dc:date>2015-12-11T17:51:28Z</dc:date>
    <item>
      <title>Ilogic Multivariable Parameter Creation Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5944353#M347978</link>
      <description>&lt;P&gt;Have this snippet of code where parameter "COLOR" is created as user parameter if it does not exist in a part.&amp;nbsp; How can I make multivariable parameter that would appear as drop down menu with multiple COLOR options:&amp;nbsp; RED, GREEN, BLUE, etc?&lt;/P&gt;&lt;P&gt;Easy to create multivariable parameter list in the part but this code will add them to old parts created before the COLOR parameter was important.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;doc = ThisDoc.Document&lt;/P&gt;&lt;P&gt;Dim oPartCompDef As PartComponentDefinition = doc.ComponentDefinition&lt;BR /&gt;Dim oParams As Parameters = oPartCompDef.Parameters&lt;BR /&gt;Dim oUserParams As UserParameters = oParams.UserParameters&lt;BR /&gt;Dim ParameterChecker As Parameter&lt;BR /&gt;Try&lt;BR /&gt;ParameterChecker = oParams("COLOR")&lt;BR /&gt;Catch&lt;BR /&gt;ParameterChecker = oUserParams.AddByValue("COLOR","RED","text")&amp;nbsp; ' how to make drop down list:&amp;nbsp; RED, GREEN, BLUE, ....&lt;BR /&gt;End Try&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5944353#M347978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-09T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Multivariable Parameter Creation Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5944371#M347979</link>
      <description>&lt;P&gt;Some stuff here..&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.com/2011/01/ilogic-code-to-set-part-number-per.html" target="_blank"&gt;http://inventortrenches.blogspot.com/2011/01/ilogic-code-to-set-part-number-per.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Inventor/files/GUID-1A217E8E-FE3A-4E84-9926-8E11C81D60D9-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Inventor/files/GUID-1A217E8E-FE3A-4E84-9926-8E11C81D60D9-htm.html&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;inputlistbox&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;google "autodesk Inventor ilogic list"&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:31:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5944371#M347979</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2015-12-09T19:31:07Z</dc:date>
    </item>
    <item>
      <title>iLogic Color MultiValue.List</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5945676#M347980</link>
      <description>&lt;P&gt;Hi DavidBapst,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a quick example rule to look for a paramater list for color, and create it if it is not found, and then set the part color.&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;PRE&gt;iLogicVb.UpdateWhenDone = True

'check For Parameter and create If Not found
Try
	'get parameter value (just to see if it exists)
	oTest = Parameter("Color") 
Catch
	' Get the active document.  Assumes a part document is active.
    Dim partDoc As PartDocument
    partDoc = ThisApplication.ActiveDocument
    
    ' Get the UserParameters collection
    Dim userParams As UserParameters
    userParams = partDoc.ComponentDefinition.Parameters.UserParameters
	
	'create the parameter
	oParam = userParams.AddByValue("Color", "Red", UnitsTypeEnum.kTextUnits)
End Try

'Set the list
MultiValue.SetList("Color", "Red", "Default", "Gray")

'Get user input and set color
iProperties.PartColor = InputListBox("Choose a color.", _
MultiValue.List("Color"), MultiValue.List("Color").Item(0), "iLogic", "List of Colors:")&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Dec 2015 14:59:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5945676#M347980</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-12-10T14:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Multivariable Parameter Creation Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5947934#M347981</link>
      <description>&lt;P&gt;Multivariable parameter list creator works great thanks!&amp;nbsp; How can I make the variable "Key".&amp;nbsp; Also, the parameter gets added to end of parameter list - any way to auto sort the list by "KEY" parameters after creation?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:35:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5947934#M347981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-11T17:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Multivariable Parameter Creation Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5947950#M347982</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi DavidBapst,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To set the parameter as a key you can add this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Parameter.Param("Color").IsKey​ = True&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the other question, I assume you're talking about in the Form Editor? If so, I don't know of a way to sort or re-order, but you can filter for keys:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Autodesk Inventor iLogic Form Key Parameters.png" alt="Autodesk Inventor iLogic Form Key Parameters.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/206188i912D0A30AEFE595F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you mean in the Parameters Editor you can click the header to sort, and use the filter button to filter for only Keys:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Autodesk Inventor iLogic Form Key Parameters2.png" alt="Autodesk Inventor iLogic Form Key Parameters2.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/206189i099CA656EE71AE85/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&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, 11 Dec 2015 17:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-multivariable-parameter-creation-rule/m-p/5947950#M347982</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2015-12-11T17:51:28Z</dc:date>
    </item>
  </channel>
</rss>

