<?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 set parameters based on initial multivalue parameter instance in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4755393#M126893</link>
    <description>&lt;P&gt;Hi James,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if I understand correctly, you have a main parameter (&lt;SPAN style="line-height: 15px;"&gt;Tank_Lifting_Lug_WWL_Tonnes&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;) and you just want to make sure that whenever that is changed, the other values update automatically, right?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;So I created a part with all those multivalue parameters. Then created a rule that fills those with values:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;MultiValue.SetList("Tank_Lifting_Lug_WWL_Tonnes", 2, 3, 4, 5, 6, 8, 10)
MultiValue.SetList("Tank_Lifting_Lug_Hole_DIA", 28, 36, 39, 42, 46, 57, 60)
MultiValue.SetList ("Tank_Lifting_Lug_Hole_to_Base", 36, 44, 50, 54, 62, 67, 76)
MultiValue.SetList("Tank_Lifting_Lug_Edge_Flat_Length", 14, 17, 22, 22, 24, 28, 31)
MultiValue.SetList ("Tank_Lifting_Lug_Base_Width", 100, 127, 141, 151, 184, 203, 215)
MultiValue.SetList ("Tank_Lifting_Lug_Plate_THK", 16, 20, 25, 25, 28, 32, 36)
MultiValue.SetList("Tank_Lifting_Lug_Outside_RAD", 42, 54, 59, 63, 69, 86, 90)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Then I have another rule named "&lt;SPAN&gt;Tank_Lifting_Lug_WWL_Tonnes" that will update the other parameters whenever any parameter changes:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;' This returns an array of strings
Dim weights As ArrayList = MultiValue.List("Tank_Lifting_Lug_WWL_Tonnes")

' Get back current value as a string
Dim weight As String = Tank_Lifting_Lug_WWL_Tonnes

' Find its index in the list
Dim n As Integer = weights.IndexOf(weight)

' Set the given index for all parameters
Tank_Lifting_Lug_Hole_DIA = MultiValue.List("Tank_Lifting_Lug_Hole_DIA")(n)
Tank_Lifting_Lug_Hole_to_Base = MultiValue.List("Tank_Lifting_Lug_Hole_to_Base")(n)
Tank_Lifting_Lug_Edge_Flat_Length = MultiValue.List("Tank_Lifting_Lug_Edge_Flat_Length")(n)
Tank_Lifting_Lug_Base_Width = MultiValue.List("Tank_Lifting_Lug_Base_Width")(n)
Tank_Lifting_Lug_Plate_THK = MultiValue.List("Tank_Lifting_Lug_Plate_THK")(n)
Tank_Lifting_Lug_Outside_RAD = MultiValue.List("Tank_Lifting_Lug_Outside_RAD")(n)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;This seems to do what I think you want. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;Cheers,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2014 17:32:40 GMT</pubDate>
    <dc:creator>adam.nagy</dc:creator>
    <dc:date>2014-01-16T17:32:40Z</dc:date>
    <item>
      <title>Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4683099#M126889</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Hi All,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri" size="3" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri" size="3" color="#000000"&gt;I have a lifting lug which is sized according to the weight it is able to lift. The lugs size parameters are controlled by one multivalue parameter &lt;/FONT&gt;&lt;EM&gt;"Tank_Lifting_Lug_WWL_Tonnes&lt;/EM&gt;&lt;FONT face="Calibri" size="3" color="#000000"&gt;". I am currently selecting these size parameters by using Case Select, but wanted to know if there is a more efficient way it could be done? Possible by&lt;/FONT&gt;&lt;EM&gt; getChoice = Choose(index, "first", "second", "third")&lt;/EM&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;? Below &amp;nbsp;is a list of the values for each instance of the lug. If for example you were to choose:&amp;nbsp; "Tank_Lifting_Lug_WWL_Tonnes" 3 then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;"Tank_Lifting_Lug_Hole_DIA" would &amp;nbsp;= &amp;nbsp;36 &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;"Tank_Lifting_Lug_Hole_to_Base" &amp;nbsp;would = 44 etc&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;List of Values:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MultiValue.List("Tank_Lifting_Lug_WWL_Tonnes", 2, 3, 4, 5, 6, 8, 10)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Hole_DIA", 28, 36, 39, 42, 46, 57, 60)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Hole_to_Base", 36, 44, 50, 54, 62, 67, 76)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Edge_Flat_Length", 14, 17, 22, 22, 24, 28, 31)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Base_Width", 100, 127, 141, 151, 184, 203, 215)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Plate_THK", 16, 20, 25, 25, 28, 32, 36)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;("Tank_Lifting_Lug_Outside_RAD", 42, 54, 59, 63, 69, 86, 90)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2013 03:05:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4683099#M126889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-10T03:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4694289#M126890</link>
      <description>&lt;P&gt;I personally prefer Array.IndexOf method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'our data lists
Dim Tank_Lifting_Lug_WWL_Tonnes() As Integer = { 2, 3, 4, 5, 6, 8, 10}
Dim Tank_Lifting_Lug_Hole_DIA() As Integer = { 28, 36, 39, 42, 46, 57, 60}
Dim Tank_Lifting_Lug_Hole_to_Base() As Integer = { 36, 44, 50, 54, 62, 67, 76}
Dim Tank_Lifting_Lug_Edge_Flat_Length() As Integer = { 14, 17, 22, 22, 24, 28, 31}
Dim Tank_Lifting_Lug_Base_Width() As Integer = { 100, 127, 141, 151, 184, 203, 215}
Dim Tank_Lifting_Lug_Plate_THK() As Integer = { 16, 20, 25, 25, 28, 32, 36}
Dim Tank_Lifting_Lug_Outside_RAD() As Integer = { 42, 54, 59, 63, 69, 86, 90}
 
'find values for the given input weight
Dim weight As Integer = 5
'index in array.  Start from 0.  Returns -1 if value is not found.
Dim n As Integer = Array.IndexOf(Tank_Lifting_Lug_WWL_Tonnes, weight)
 
MsgBox( "WWL_Tonnes       = " &amp;amp; weight &amp;amp; vbNewLine &amp;amp; _
         "Hole_DIA         = " &amp;amp; Tank_Lifting_Lug_Hole_DIA(n) &amp;amp; vbNewLine &amp;amp; _
         "Hole_to_Base     = " &amp;amp; Tank_Lifting_Lug_Hole_to_Base(n) &amp;amp; vbNewLine &amp;amp; _
         "Edge_Flat_Length = " &amp;amp; Tank_Lifting_Lug_Edge_Flat_Length(n) &amp;amp; vbNewLine &amp;amp; _
         "Base_Width       = " &amp;amp; Tank_Lifting_Lug_Base_Width(n) &amp;amp; vbNewLine &amp;amp; _
         "Plate_THK        = " &amp;amp; Tank_Lifting_Lug_Plate_THK(n) &amp;amp; vbNewLine &amp;amp; _
         "Outside_RAD      = " &amp;amp; Tank_Lifting_Lug_Outside_RAD(n) )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;See MSDN for additional information on &lt;A title="Array class methods." href="http://msdn.microsoft.com/ru-ru/library/system.array(v=vs.110).aspx" target="_self"&gt;Array class methods.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Sat, 14 Dec 2013 22:27:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4694289#M126890</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2013-12-14T22:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4697015#M126891</link>
      <description>&lt;P&gt;Hi Vladimir,&lt;/P&gt;&lt;P&gt;Thanks for your reply. The rule returns the&amp;nbsp;correct value&amp;nbsp;for all the parameters listed, via the value specified in the following line: &lt;STRONG&gt;Dim&lt;/STRONG&gt; weight &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;Integer&lt;/STRONG&gt; &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;5, &lt;/STRONG&gt;as a&amp;nbsp;MsgBox on the screen. Is there a way of:&lt;/P&gt;&lt;P&gt;1. Setting the value of the Integer via the multi value parameter Tank_Lifting_Lug_WLL_Tonnes directly, instead of manually typing it in?&lt;/P&gt;&lt;P&gt;2. Forcing all the parameters to change to that integer? As they seem to stay at their current value, even though the MsgBox appears with the correct values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks or your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 16:07:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4697015#M126891</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-16T16:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4698851#M126892</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; Setting the value of the Integer via the multi value parameter &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;P&gt;Answer: Yes, of course, this is much more friendly way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; Forcing all the parameters to change to that integer?&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;P&gt;Answer: If input mass is not changed then nothing should be recalculated.&amp;nbsp; Scenario is entirely defined by you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 09:35:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4698851#M126892</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2013-12-17T09:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4755393#M126893</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if I understand correctly, you have a main parameter (&lt;SPAN style="line-height: 15px;"&gt;Tank_Lifting_Lug_WWL_Tonnes&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;) and you just want to make sure that whenever that is changed, the other values update automatically, right?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;So I created a part with all those multivalue parameters. Then created a rule that fills those with values:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;MultiValue.SetList("Tank_Lifting_Lug_WWL_Tonnes", 2, 3, 4, 5, 6, 8, 10)
MultiValue.SetList("Tank_Lifting_Lug_Hole_DIA", 28, 36, 39, 42, 46, 57, 60)
MultiValue.SetList ("Tank_Lifting_Lug_Hole_to_Base", 36, 44, 50, 54, 62, 67, 76)
MultiValue.SetList("Tank_Lifting_Lug_Edge_Flat_Length", 14, 17, 22, 22, 24, 28, 31)
MultiValue.SetList ("Tank_Lifting_Lug_Base_Width", 100, 127, 141, 151, 184, 203, 215)
MultiValue.SetList ("Tank_Lifting_Lug_Plate_THK", 16, 20, 25, 25, 28, 32, 36)
MultiValue.SetList("Tank_Lifting_Lug_Outside_RAD", 42, 54, 59, 63, 69, 86, 90)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Then I have another rule named "&lt;SPAN&gt;Tank_Lifting_Lug_WWL_Tonnes" that will update the other parameters whenever any parameter changes:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;' This returns an array of strings
Dim weights As ArrayList = MultiValue.List("Tank_Lifting_Lug_WWL_Tonnes")

' Get back current value as a string
Dim weight As String = Tank_Lifting_Lug_WWL_Tonnes

' Find its index in the list
Dim n As Integer = weights.IndexOf(weight)

' Set the given index for all parameters
Tank_Lifting_Lug_Hole_DIA = MultiValue.List("Tank_Lifting_Lug_Hole_DIA")(n)
Tank_Lifting_Lug_Hole_to_Base = MultiValue.List("Tank_Lifting_Lug_Hole_to_Base")(n)
Tank_Lifting_Lug_Edge_Flat_Length = MultiValue.List("Tank_Lifting_Lug_Edge_Flat_Length")(n)
Tank_Lifting_Lug_Base_Width = MultiValue.List("Tank_Lifting_Lug_Base_Width")(n)
Tank_Lifting_Lug_Plate_THK = MultiValue.List("Tank_Lifting_Lug_Plate_THK")(n)
Tank_Lifting_Lug_Outside_RAD = MultiValue.List("Tank_Lifting_Lug_Outside_RAD")(n)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;This seems to do what I think you want. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&lt;SPAN&gt;Cheers,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:32:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/4755393#M126893</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2014-01-16T17:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic set parameters based on initial multivalue parameter instance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/5216139#M126894</link>
      <description>&lt;P&gt;&lt;EM&gt;Hello,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I would like to know how to use and its application of &amp;nbsp;&lt;STRONG&gt;getChoice = Choose(index, "first", "second", "third")&amp;nbsp;&lt;/STRONG&gt;in inventor ilogic.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;please share any example file if you have any.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2014 11:12:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-set-parameters-based-on-initial-multivalue-parameter/m-p/5216139#M126894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-15T11:12:45Z</dc:date>
    </item>
  </channel>
</rss>

