<?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, temporary preselection in MultiValueList in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9890322#M55693</link>
    <description>&lt;P&gt;You can use expression&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;.&lt;SPAN&gt;Param&lt;/SPAN&gt;(&lt;SPAN&gt;"ConTck"&lt;/SPAN&gt;).&lt;SPAN&gt;Expression&lt;/SPAN&gt; = &lt;SPAN&gt;"HeaderTck"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I add one ipt exampe&amp;nbsp; with forms&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Johan&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 21:53:21 GMT</pubDate>
    <dc:creator>JMGunnar</dc:creator>
    <dc:date>2020-11-23T21:53:21Z</dc:date>
    <item>
      <title>iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9888491#M55690</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question integrated the inserted screen photo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-11-23_09-52-06.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/847511i27CE3C8C432CE1FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-11-23_09-52-06.png" alt="2020-11-23_09-52-06.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 09:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9888491#M55690</guid>
      <dc:creator>BRLMCHKD</dc:creator>
      <dc:date>2020-11-23T09:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9889873#M55691</link>
      <description>&lt;P&gt;Here is a link to a fairly well known iLogic example by&amp;nbsp;Curtis Waguespack which demonstrates setting up multiple dynamically filtered multi-value lists based on selections from prior multi-value lists.&lt;/P&gt;&lt;P&gt;&lt;A href="https://inventortrenches.blogspot.com/2017/02/ilogic-dynamic-multivalue-parameter.html" target="_blank" rel="noopener"&gt;https://inventortrenches.blogspot.com/2017/02/ilogic-dynamic-multivalue-parameter.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this will help you set-up the scenario your trying to achieve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 18:39:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9889873#M55691</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-11-23T18:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9890309#M55692</link>
      <description>&lt;P&gt;I think you can set up your second list to have the first list as an option:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="List 1" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/847793i50AE5C9C8949D66A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="temp_pic.JPG" alt="List 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;List 1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="List 2 with List 1 as an option" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/847794i2589DC38C03E3508/image-size/medium?v=v2&amp;amp;px=400" role="button" title="temp_pic2.JPG" alt="List 2 with List 1 as an option" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;List 2 with List 1 as an option&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Setting them in a rule would look like:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;MultiValue.SetList("LIST1", "1.0 in", "2.0 in", "3.0 in", "4.0 in", "5.0 in")

MultiValue.SetList("LIST2", "LIST1", "1.0 in", "2.0 in")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this is enough for your intention, or if you have any questions&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 21:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9890309#M55692</guid>
      <dc:creator>J-Camper</dc:creator>
      <dc:date>2020-11-23T21:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9890322#M55693</link>
      <description>&lt;P&gt;You can use expression&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;.&lt;SPAN&gt;Param&lt;/SPAN&gt;(&lt;SPAN&gt;"ConTck"&lt;/SPAN&gt;).&lt;SPAN&gt;Expression&lt;/SPAN&gt; = &lt;SPAN&gt;"HeaderTck"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I add one ipt exampe&amp;nbsp; with forms&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Johan&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 21:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9890322#M55693</guid>
      <dc:creator>JMGunnar</dc:creator>
      <dc:date>2020-11-23T21:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9892141#M55694</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to make a preselection of ConTck with the code added in the foto,&lt;/P&gt;&lt;P&gt;but errors occurs, what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-11-24_15-31-54.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/848127i2FC8DCBB60FB3F14/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-11-24_15-31-54.png" alt="2020-11-24_15-31-54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 14:41:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9892141#M55694</guid>
      <dc:creator>BRLMCHKD</dc:creator>
      <dc:date>2020-11-24T14:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9892931#M55695</link>
      <description>&lt;P&gt;I'm assuming (from the error message file extension) that you are working with an assembly, and that the form shown in your first post is a local iLogic form, which is local to this assembly, and that the iLogic rule we're attempting to create is going to be a local rule, and local to this assembly?&lt;/P&gt;&lt;P&gt;If all that is true, this might work for you.&lt;/P&gt;&lt;P&gt;Since the form is local, it should immediately react to your parameter changes within it.&amp;nbsp; And if the rule is also local to this document, it should recognize local parameters and turn them blue within your rule editor.&amp;nbsp; If so, we can use this to trigger the rule to run immediately when the first parameter is changed, by setting up a 'dummy variable' and make it equal to the local (blue) parameter name of the first parameter.&amp;nbsp; That's our trigger.&amp;nbsp; Now for the rest of the code to change the current value of the second multi-value parameter to equal the value of the first parameter, then allow you to change it later.&amp;nbsp; Here's what I think may work for your situation.&amp;nbsp; When you get the actual UserParameter object, you can access and work with its ExpressionList property, which should make this work.&lt;/P&gt;&lt;P&gt;Here's the code.&lt;/P&gt;&lt;P&gt;(on your machine, the parameter name after oDV = , should turn blue (by default) if it is a local parameter.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;oDV = HeaderTck_iLoForm

'Get the UserPameters collection for the active document
Dim oUParams As UserParameters = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters

'Get the current value of the parameter that triggered this (as a String)
Dim oVal As String = oUParams.Item("HeaderTck_iLoForm").Value.ToString

'Get the ExpressionList (Array of String) from the target param, so we don't loose it when we set the value
Dim oUParam2 As UserParameter = oUParams.Item("ConTck_iLoForm")
Dim oUP2Values() As String = oUParam2.ExpressionList.GetExpressionList

'Get the 'Index' of the source value within the target param's ExpressionList array
Dim oIndex As Integer = Array.IndexOf(oUP2Values, oVal)

'Set the same list back to the target param,
'but change its current value to the value at that 'index' of its values
oUParam2.ExpressionList.SetExpressionList(oUP2Values,True,oIndex)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you have time, please... Vote For &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&lt;/SPAN&gt;&lt;/A&gt;and Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/" target="_blank" rel="noopener"&gt;Inventor 2021 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank" rel="noopener"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank" rel="noopener"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank" rel="noopener"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:02:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9892931#M55695</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-11-24T20:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9894136#M55696</link>
      <description>&lt;P&gt;Hi W.Crihfield&lt;/P&gt;&lt;P&gt;Yes correct, the rule is added local in the specified assembly.&lt;/P&gt;&lt;P&gt;This morning, I have tried the rule code you have specified.&lt;/P&gt;&lt;P&gt;I could only succeed to change the "ConTck" parameter once.But subsequently it has not changed value when&lt;/P&gt;&lt;P&gt;"HeaderTck" value have been changed? Your code see inserted foto, sorry for the poor quality, I work home on a VPN connection.&lt;/P&gt;&lt;P&gt;But I just mean that I in the past, have seen a simpler code to do this trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-11-25_09-04-10.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/848477i790B7B4A832E2FF8/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-11-25_09-04-10.png" alt="2020-11-25_09-04-10.png" /&gt;&lt;/span&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 08:23:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9894136#M55696</guid>
      <dc:creator>BRLMCHKD</dc:creator>
      <dc:date>2020-11-25T08:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9894523#M55697</link>
      <description>&lt;P&gt;I'm curious why you seem to have two versions of every parameter.&amp;nbsp; One that seems like the original, and one with "_iLoForm" at the end of it.&amp;nbsp; Judging by the image in your previous post, you seem to be referencing a model file found within your Vault system.&amp;nbsp; And the original parameter's seem to be found within that, then you've created copies of all those parameters within the active assembly.&amp;nbsp; Are you attempting to 'drive' all those parameters within the referenced model by the local model's parameters?&amp;nbsp; Since I'm not currently working with Vault, I wouldn't really know how that interaction should function, so I wouldn't be able to offer any advice there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; In your last post, within the rule named "Rule for Form", I assume this is just to push all those parameter values out to the referenced model file, right, and not intended to aid in firing the following rule named "PreSelect of ConTck"?&amp;nbsp; So, these rules should fire in the order they are listed within the document, unless otherwise specified.&amp;nbsp; If so, you've already pushed the value of both of those parameters out to the referenced model, without the value of "ConTck_iLoForm" having been changed by the third rule yet.&amp;nbsp; Perhaps adding a line of code to the end of that third rule that will do as it does in the second rule, and push its value out to the referencing model, after it has been changed would work for you (or vise versa).&amp;nbsp; You may also need to change the order the rules are running, but I'm not sure.&amp;nbsp; And if you don't need to maintain a multi-value list within the referenced model file, you could likely just eliminate the list preservation technique within my last posted code, and just set the value&amp;nbsp; directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Also within your iLogic rule editor dialog box, while you've got each of those rules open, make sure that on the Options tab, under "Behavior of this Rule" the "Silend operation" option is checked, and the "Fire dependent rules immediately" option is checked.&amp;nbsp; And make sure the following options are turned off:&amp;nbsp; "Don't run automatically", "Straight VB code", "Suppressed".&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 12:09:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9894523#M55697</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-11-25T12:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic, temporary preselection in MultiValueList</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9896489#M55698</link>
      <description>&lt;P&gt;Hi W.Crihfield&lt;/P&gt;&lt;P&gt;Why I have two versions of the same parameter, when the only difference&amp;nbsp;is the suffix _iLoForm?&lt;/P&gt;&lt;P&gt;The reason is, that I have a Skeleton part, where I control certain key parameters in&amp;nbsp;my assembly&lt;/P&gt;&lt;P&gt;via a Form called ‘Rule for Form’ see inserted foto.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have now concluded that it is actually not such a good idea anyway, with the&amp;nbsp;temporary&lt;/P&gt;&lt;P&gt;preselection in the MultiValueList. It is difficult to explain why, but I give&amp;nbsp;it a try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I liked the idea that “ConTck” automatically adjusts when I changed on the value&amp;nbsp;of “HeaderTck”&lt;/P&gt;&lt;P&gt;(because that’s how it will be, for the most part, in reality). But there&amp;nbsp;may also be cases where I&lt;/P&gt;&lt;P&gt;change the “HeaderTck”, but where I still want the “ConTck”&amp;nbsp;unchanged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, it is actually not very appropriate to set up any rule for this anyway. As first assumed.&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience I have caused, and Thanks for all the helpfulness.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR/&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-11-26_07-38-05.png" style="width: 499px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/848890iB03E542A9C1C92BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-11-26_07-38-05.png" alt="2020-11-26_07-38-05.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 06:53:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-temporary-preselection-in-multivaluelist/m-p/9896489#M55698</guid>
      <dc:creator>BRLMCHKD</dc:creator>
      <dc:date>2020-11-26T06:53:14Z</dc:date>
    </item>
  </channel>
</rss>

