<?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: populate a parameter in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8582919#M94200</link>
    <description>&lt;P&gt;Okay, I got it to work (Sort of).&amp;nbsp; I was able to correct my coding error to allow for the cell value to load into my parameter, but it is not updating as I change the value of my BStyle Parameter.&amp;nbsp; Apparently the BS_Name parameter is not linking to my rule dynamically.&amp;nbsp; Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;GoExcel.Open("3rd Party:Embedding 2", "Sheet1")&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;MultiValue.List("BSeries") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B4", "")&lt;/P&gt;
&lt;P&gt;Series = Parameter("BSeries")&lt;/P&gt;
&lt;P&gt;rangeArray = GoExcel.NamedRangeValue("BS_" &amp;amp; BSeries)&lt;/P&gt;
&lt;P&gt;Dim oList As ArrayList&lt;BR /&gt;oList = New ArrayList&lt;/P&gt;
&lt;P&gt;Dim oRows&lt;BR /&gt;oRows = rangeArray.GetLength(0)&lt;BR /&gt;&lt;BR /&gt;Dim oRowIndex As Integer&lt;/P&gt;
&lt;P&gt;For oRowIndex = 3 To oRows&lt;BR /&gt;oList.Add(rangeArray(oRowIndex,1))&lt;BR /&gt;Next&lt;BR /&gt;MultiValue.List("BStyle")=oList&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;Dim nRow As Integer&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;For nRow = 4 To 100&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;If GoExcel.CellValue("o" &amp;amp; nRow) = Parameter("BStyle")&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;Parameter("BS_Name") = GoExcel.CellValue("P" &amp;amp; nRow)&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;
&lt;P&gt;GoExcel.Save&lt;BR /&gt;GoExcel.close&lt;/P&gt;
&lt;P&gt;iLogicVb.UpdateWhenDone = True&lt;/P&gt;</description>
    <pubDate>Fri, 08 Feb 2019 14:45:45 GMT</pubDate>
    <dc:creator>asmenut</dc:creator>
    <dc:date>2019-02-08T14:45:45Z</dc:date>
    <item>
      <title>populate a parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8582757#M94197</link>
      <description>&lt;P&gt;I have a part that I am extracting parameters from an embedded spreadsheet. I am able to extract the multi-value parameters easy enough, but I am having issues trying to extract a single value from the 2nd column of a&amp;nbsp; 2 column range based upon a given parameter value. I have tried using GoExcel.NamedRangeValue and also FindRow and CurrentRowvalue methods, but at best I get an error that it cant find a column name.&amp;nbsp; Below is the code and I am attaching a copy of the embedded spreadsheet.&amp;nbsp; Plz help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GoExcel.Open("3rd Party:Embedding 2", "Sheet1")&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;MultiValue.List("BSeries") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B4", "")&lt;/P&gt;
&lt;P&gt;Series = Parameter("BSeries")&lt;/P&gt;
&lt;P&gt;rangeArray = GoExcel.NamedRangeValue("BS_" &amp;amp; BSeries)&lt;/P&gt;
&lt;P&gt;Dim oList As ArrayList&lt;BR /&gt;oList = New ArrayList&lt;/P&gt;
&lt;P&gt;Dim oRows&lt;BR /&gt;oRows = rangeArray.GetLength(0)&lt;BR /&gt;&lt;BR /&gt;Dim oRowIndex As Integer&lt;/P&gt;
&lt;P&gt;For oRowIndex = 1 To oRows&lt;BR /&gt;oList.Add(rangeArray(oRowIndex,1))&lt;BR /&gt;Next&lt;BR /&gt;MultiValue.List("BStyle")=oList&lt;/P&gt;
&lt;P&gt;bn1 = GoExcel.FindRow("3rd Party:Embedding 2", "Sheet1","BELT_STYLE", "=", Parameter("BStyle"))&lt;BR /&gt;Parameter("B_Name")= GoExcel.CurrentRowValue("STYLE_NAME")&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;GoExcel.close&lt;/P&gt;
&lt;P&gt;iLogicVb.UpdateWhenDone = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 13:38:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8582757#M94197</guid>
      <dc:creator>asmenut</dc:creator>
      <dc:date>2019-02-08T13:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: populate a parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8582919#M94200</link>
      <description>&lt;P&gt;Okay, I got it to work (Sort of).&amp;nbsp; I was able to correct my coding error to allow for the cell value to load into my parameter, but it is not updating as I change the value of my BStyle Parameter.&amp;nbsp; Apparently the BS_Name parameter is not linking to my rule dynamically.&amp;nbsp; Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;GoExcel.Open("3rd Party:Embedding 2", "Sheet1")&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;MultiValue.List("BSeries") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B4", "")&lt;/P&gt;
&lt;P&gt;Series = Parameter("BSeries")&lt;/P&gt;
&lt;P&gt;rangeArray = GoExcel.NamedRangeValue("BS_" &amp;amp; BSeries)&lt;/P&gt;
&lt;P&gt;Dim oList As ArrayList&lt;BR /&gt;oList = New ArrayList&lt;/P&gt;
&lt;P&gt;Dim oRows&lt;BR /&gt;oRows = rangeArray.GetLength(0)&lt;BR /&gt;&lt;BR /&gt;Dim oRowIndex As Integer&lt;/P&gt;
&lt;P&gt;For oRowIndex = 3 To oRows&lt;BR /&gt;oList.Add(rangeArray(oRowIndex,1))&lt;BR /&gt;Next&lt;BR /&gt;MultiValue.List("BStyle")=oList&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;Dim nRow As Integer&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;For nRow = 4 To 100&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;If GoExcel.CellValue("o" &amp;amp; nRow) = Parameter("BStyle")&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff6600"&gt;&lt;U&gt;Parameter("BS_Name") = GoExcel.CellValue("P" &amp;amp; nRow)&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;
&lt;P&gt;GoExcel.Save&lt;BR /&gt;GoExcel.close&lt;/P&gt;
&lt;P&gt;iLogicVb.UpdateWhenDone = True&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 14:45:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8582919#M94200</guid>
      <dc:creator>asmenut</dc:creator>
      <dc:date>2019-02-08T14:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: populate a parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8589088#M94291</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3064"&gt;@asmenut&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To work with GoExcel.NamedRangeValue, try suggestions provided in the below link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/manufacturing/2013/11/setting-multi-value-parameter-from-excel-named-range-values.html" target="_blank"&gt;https://adndevblog.typepad.com/manufacturing/2013/11/setting-multi-value-parameter-from-excel-named-range-values.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To update &lt;STRONG&gt;"BS_name"&lt;/STRONG&gt; parameter dynamically on changing &lt;STRONG&gt;"BStyle"&lt;/STRONG&gt; parameter, need to write one more iLogic which is triggered on "Any Model Parameter Change" event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 05:36:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/populate-a-parameter/m-p/8589088#M94291</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-02-12T05:36:20Z</dc:date>
    </item>
  </channel>
</rss>

