<?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 Excel Next Available Line in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026696#M112556</link>
    <description>&lt;P&gt;Hi Chirpyboy2060647,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure I've seen an example that only looks at the rows in use and finds the last used, but this is what I had on hand. It looks at the first 2000 rows and finds the last used.&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;PRE&gt;'open the spreadsheet
GoExcel.Open("MyExcelFile.xls"), "Sheet1")

'Define Range
oRowStart = 2
oRowEnd = 2000
Dim count As Double
For count = oRowStart To oRowEnd
	' If it's blank count it
	If String.IsNullOrEmpty(GoExcel.CellValue("A" &amp;amp; count)) Then 
		i = i + 1
	End If
Next
' Next empty row is max rows minus blank rows plus one
oEmptyRow = oRowEnd - i + 1	&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Feb 2016 20:50:15 GMT</pubDate>
    <dc:creator>Curtis_Waguespack</dc:creator>
    <dc:date>2016-02-05T20:50:15Z</dc:date>
    <item>
      <title>Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026643#M112555</link>
      <description>&lt;P&gt;Hey all, So the task is on me now to deal with our engineering stamp request log. And I've got the code to pull what information i want...thats taken care of. My question now is, is there a code that will fill the next available line. So if A1-D1 is filled it will pull my properties to the next open line A2-D2? Without me having to manually change this every time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 20:01:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026643#M112555</guid>
      <dc:creator>Chirpyboy2060647</dc:creator>
      <dc:date>2016-02-05T20:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026696#M112556</link>
      <description>&lt;P&gt;Hi Chirpyboy2060647,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure I've seen an example that only looks at the rows in use and finds the last used, but this is what I had on hand. It looks at the first 2000 rows and finds the last used.&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;PRE&gt;'open the spreadsheet
GoExcel.Open("MyExcelFile.xls"), "Sheet1")

'Define Range
oRowStart = 2
oRowEnd = 2000
Dim count As Double
For count = oRowStart To oRowEnd
	' If it's blank count it
	If String.IsNullOrEmpty(GoExcel.CellValue("A" &amp;amp; count)) Then 
		i = i + 1
	End If
Next
' Next empty row is max rows minus blank rows plus one
oEmptyRow = oRowEnd - i + 1	&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Feb 2016 20:50:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026696#M112556</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2016-02-05T20:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026827#M112557</link>
      <description>&lt;P&gt;Oh nice, ill mess around with this and see how it works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;open the spreadsheet&lt;/SPAN&gt;
&lt;SPAN&gt;ExcelFile&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;  &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Test PO&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;.xlsx&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;GoExcel&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;CellValue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ExcelFile&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt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&lt;/SPAN&gt;&lt;SPAN&gt;Custom&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;FI_007&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Proj Name&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Actually heere is a sample of what im using to pull to a template excel. If you could guide me on how i would modify this ( i can change the rest of what im pulling or need to) to go inline with your code?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 22:01:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026827#M112557</guid>
      <dc:creator>Chirpyboy2060647</dc:creator>
      <dc:date>2016-02-05T22:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026899#M112558</link>
      <description>&lt;P&gt;Hi Chirpyboy2060647,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So once the Empty Row is found (per the earlier example), you can use something like this to fill in each cell for that&amp;nbsp;row,&amp;nbsp;with the given iProperty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that there is no need to call out the Excel file and Sheet again&amp;nbsp;once it's been established in the code (Autodesk doesn't really do a great job of telling us that in the ilogic documenation or snippets).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;GoExcel.CellValue("B" &amp;amp; oEmptyRow) = iProperties.Value("Project", "Part Number") 
GoExcel.CellValue("C" &amp;amp; oEmptyRow) = iProperties.Value("Project", "Revision Number")
GoExcel.CellValue("D" &amp;amp; oEmptyRow) = iProperties.Value("Status", "Engr Date Approved") &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&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, 05 Feb 2016 22:58:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6026899#M112558</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2016-02-05T22:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6027039#M112559</link>
      <description>&lt;P&gt;Call me different, but I like to avoid the iLogics whenever possible. Instead, the easiest way I have found is something LIKE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;xlapp = GoExcel.Application
oLastRow = xlapp.ActiveWorkbook.Activesheet.UsedRange.Rows.Count&lt;/PRE&gt;&lt;P&gt;Which is actually kind of a mesh between the two; avoids the marshal call to get the excel app, but still uses the native excel API to perform the functions that you want, which makes more sense to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can also access rows based off of numbers instead of having to have something solid/extra functions for alphanumeric;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ie;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ActiveWorkBook.ActiveSheet.Cells(1,1).Value = "Text"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where (1,1) is (rowNumber, columnNumber)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Feb 2016 03:14:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6027039#M112559</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-02-06T03:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6045767#M112560</link>
      <description>&lt;P&gt;Hi Curis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the late response of if this works or not, got really busy at work so i couldnt mess with this code for a bit. When i go to run the code i get the error&lt;/P&gt;&lt;P&gt;Error in rule: Next Line, in document: ORD-19948-A.dwg&lt;/P&gt;&lt;P&gt;Unable to cast object of type 'System.String' to type 'System.Object[,]'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Here is my code right now&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;open the spreadsheet&lt;/SPAN&gt;
&lt;SPAN&gt;GoExcel&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A target="_blank"&gt;\\0-File&lt;/A&gt; Transfer\Brian\Line.xlsx&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&l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&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;GoExcel.CellValue(ExcelFile, "Sheet1", "K2")  = iProperties.Value("Custom", "FI_005") &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 16:54:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6045767#M112560</guid>
      <dc:creator>Chirpyboy2060647</dc:creator>
      <dc:date>2016-02-18T16:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic Excel Next Available Line</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6055112#M112561</link>
      <description>This actually worked just fine, but ILogic doesn't like when you copy and paste and gives weird spacing. But works perfectly Thank you</description>
      <pubDate>Wed, 24 Feb 2016 19:56:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-excel-next-available-line/m-p/6055112#M112561</guid>
      <dc:creator>Chirpyboy2060647</dc:creator>
      <dc:date>2016-02-24T19:56:54Z</dc:date>
    </item>
  </channel>
</rss>

