<?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 code to read a specific excel sheet in a workbook in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6732027#M298863</link>
    <description>&lt;P&gt;Hmm. Control Definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html" target="_blank"&gt;http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this blog says, that function might be limited and you might not actually be able to specify that for the command. It's worth looking into though!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have to think of some other way of organizing your excel files so that you can give in to what inventor wants.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2016 22:22:22 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2016-12-06T22:22:22Z</dc:date>
    <item>
      <title>iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731699#M298857</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I am having trouble trying to find a way for inventor to read the coordinates (x-y) from a specific excel sheet. When I use the sketch --&amp;gt; insert--&amp;gt; points. It only pulls it from the 1st sheet of the excel.. I need it to import a different sheet. So I was wondering there is any code for VBA or ilogic to read the points from excel in different sheets in excel&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:23:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731699#M298857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T20:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731713#M298858</link>
      <description>&lt;P&gt;The most basic is this..&lt;/P&gt;
&lt;P&gt;If you provide more details better information can be given..&lt;/P&gt;
&lt;PRE&gt;GoExcel.CellValue("filename.xls", "Sheet1", "A2")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and a link to the excel data functions reference for ilogic..&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Inventor-Help/files/GUID-00F9D915-B53A-46BF-AAAC-3535F9FD9970-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Inventor-Help/files/GUID-00F9D915-B53A-46BF-AAAC-3535F9FD9970-htm.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731713#M298858</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2016-12-06T20:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731729#M298859</link>
      <description>&lt;P&gt;Yes I tried doing that but since inside the sketch there isnt any parameters called out.. So Inventor doesn't know what to look for in Excel to import in those points. I just need a pathway or a code to get inventor to pull in excel and picking which sheet inside of excel to use those points and the points varies depending on the requirements when generating the x and y&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:32:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731729#M298859</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T20:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731745#M298860</link>
      <description>&lt;P&gt;Ok.. I like more details.. &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;Now we are here..&lt;/P&gt;
&lt;PRE&gt;Parameter("d2") = GoExcel.CellValue("filename.xlsx", "SheetName", "Cell")
iLogicVb.UpdateWhenDone = True&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:38:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731745#M298860</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2016-12-06T20:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731781#M298861</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;...I was wondering there is any code for VBA or ilogic to read the points from excel in different sheets in excel&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi lle5956,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a *.zip file at this link that has a VBA project that creates and updates a 3D sketch from&amp;nbsp;co-ordinates in an&amp;nbsp;XLS file:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Import-points-associatively-from-Excel-into-Inventor-s.html" target="_blank"&gt;https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Import-points-associatively-from-Excel-into-Inventor-s.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&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>Tue, 06 Dec 2016 20:54:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731781#M298861</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2016-12-06T20:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731885#M298862</link>
      <description>&lt;P&gt;The current code i have is this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub&lt;/STRONG&gt; &lt;STRONG&gt;Main&lt;/STRONG&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' Get the CommandManager object. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; oCommandMgr &lt;STRONG&gt;As&lt;/STRONG&gt; CommandManager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oCommandMgr &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.CommandManager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' Get control definition for the line command. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; oControlDef &lt;STRONG&gt;As&lt;/STRONG&gt; ControlDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oControlDef &lt;STRONG&gt;=&lt;/STRONG&gt; oCommandMgr.ControlDefinitions.Item&lt;STRONG&gt;(&lt;/STRONG&gt; _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"SCxImportPointsCmd"&lt;STRONG&gt;)&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' Execute the command. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Call&lt;/STRONG&gt; oControlDef.Execute&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;which basically is just the command button to browse for the excel file and once it does. it imports whatever the x-y coordinate is but i need it to where it reads from that excel file just a different sheet/tab..&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 21:34:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6731885#M298862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T21:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6732027#M298863</link>
      <description>&lt;P&gt;Hmm. Control Definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html" target="_blank"&gt;http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this blog says, that function might be limited and you might not actually be able to specify that for the command. It's worth looking into though!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have to think of some other way of organizing your excel files so that you can give in to what inventor wants.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:22:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6732027#M298863</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-12-06T22:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic code to read a specific excel sheet in a workbook</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6732112#M298864</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;The current code i have is this&amp;nbsp;....&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;...which basically is just the command button to browse for the excel file...&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi lle5956,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yeah, I don't see that being of much use for your goal here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a real quick iLogic example that reads in the specified Excel sheet, and works with the specified rows (oStartRow and oRowCount ).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This rule expects a 2D sketch to be active for edits.&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;owbook = "C:\TEMP\Book1.xlsx"
owSheet = "Sheet2"
GoExcel.Open(owbook,owSheet)

'start row to use
Dim oStartRow As Integer
oStartRow = 1

'number of rows to use
Dim oRowCount As Long
oRowCount = 10 

Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveDocument

' Set a reference to the active sketch.
Dim oSketch As PlanarSketch

'catch error when sketch 
'is not in edit mode
Try
	oSketch = ThisApplication.ActiveEditObject
Catch
	MessageBox.Show("Can not continue." &amp;amp; vbLf &amp;amp; _
	"The active Object Is Not a Sketch.", "iLogic")
	Return
End Try

' Set a reference to the transient geometry collection.
Dim oTransGeom As TransientGeometry
oTransGeom = ThisApplication.TransientGeometry

Dim i As Integer
For i = oStartRow To oRowCount
	Dim strx As String, stry As String
	strx = GoExcel.CellValue(owbook,owSheet, "A" &amp;amp; i)
	stry = GoExcel.CellValue(owbook,owSheet, "B" &amp;amp; i)    
	
	oSketch.SketchPoints.Add(oTransGeom.CreatePoint2d(strx, stry))	

Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example XLS:&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="XLS1.JPG" style="width: 216px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/299595i1056554837DA71F5/image-dimensions/216x383?v=v2" width="216" height="383" role="button" title="XLS1.JPG" alt="XLS1.JPG" /&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;Example result:&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="XLS2.JPG" style="width: 433px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/299596iFBB508214EEDDBF6/image-dimensions/433x258?v=v2" width="433" height="258" role="button" title="XLS2.JPG" alt="XLS2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:15:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workbook/m-p/6732112#M298864</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2016-12-06T23:15:57Z</dc:date>
    </item>
  </channel>
</rss>

