<?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 iLogic to create general table from excel file in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312196#M266452</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to iLogic programming and would like to simply replicate the action to insert a general table in an Inventor Drawing that is created from an excel file that i have previously made.&amp;nbsp;The file table i have in excel already filled and formatted. I would like to do this because when i place a excel table object and link it, it does not update automatically when i update the drawing and if i add rows to the excel file table, the table in the drawing does not follow through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any chance someone can help me get started? I've seen many posts go the other way (exporting to excel) but all i need to do is just insert the general table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 19:46:13 GMT</pubDate>
    <dc:creator>ivan.liu</dc:creator>
    <dc:date>2017-08-18T19:46:13Z</dc:date>
    <item>
      <title>iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312196#M266452</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to iLogic programming and would like to simply replicate the action to insert a general table in an Inventor Drawing that is created from an excel file that i have previously made.&amp;nbsp;The file table i have in excel already filled and formatted. I would like to do this because when i place a excel table object and link it, it does not update automatically when i update the drawing and if i add rows to the excel file table, the table in the drawing does not follow through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any chance someone can help me get started? I've seen many posts go the other way (exporting to excel) but all i need to do is just insert the general table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:46:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312196#M266452</guid>
      <dc:creator>ivan.liu</dc:creator>
      <dc:date>2017-08-18T19:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312203#M266453</link>
      <description>&lt;P&gt;The sample / programming help is your buddy here...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-5EEA9BEE-3236-40D5-B3AA-840238C1E3AE" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-5EEA9BEE-3236-40D5-B3AA-840238C1E3AE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Directly from the Sample in the help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Note, this is coded in vba; thus must be used in the rule editor.&lt;/P&gt;
&lt;P&gt;* conversion to vb.net for use in the rule environment simply involves removing get/set statements in this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub CreateDrawingExcelTable()    
    ' Set a reference to the active drawing document
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument
    
    ' Set a reference to the active sheet
    Dim oActiveSheet As Sheet
    Set oActiveSheet = oDrawDoc.ActiveSheet
    
    ' Create the placement point for the table
    Dim oPoint As Point2d
    Set oPoint = ThisApplication.TransientGeometry.CreatePoint2d(25, 25)
    
    ' Create the table by specifying the source Excel file
    ' This assumes that the first row in the Excel sheet specifies the column headers
    ' You can specify a different row using the last argument of the AddExcelTable method
    Dim oExcelTable As CustomTable
    Set oExcelTable = oActiveSheet.CustomTables.AddExcelTable("C:\Temp\test.xls", oPoint, "Excel Table")
End Sub&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:51:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312203#M266453</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-18T19:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312231#M266454</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3900963"&gt;@ivan.liu&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;...I would like to do this because when i place a excel table object and link it, it does not update automatically when i update the drawing and if i add rows to the excel file table, the table in the drawing does not follow through.&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;/BLOCKQUOTE&gt;
&lt;P&gt;Hi ivan.liu,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's make sure we understand the built in functionality first. See the information below. Does this do what you are wanting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After placing a table that is linked to and Excel file, you should have a 3rd Party node in the browser. If you expand this and then right cliick on the Excel file link you should see Edit, which will open the file and allow you to change or add data.&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Excel Edit2.png" style="width: 295px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/391657iE80DD0360E1BA6A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Excel Edit2.png" alt="Excel Edit2.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;Then you can right click on the table in the drawing and choose Update to see the results of the change.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(note that you do not need to edit the Excel file&amp;nbsp;using the 3rd part node for the Update option to work. You can edit it using Excel as you normally would, and Inventor should detect the change and give you the Update option)&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="Excel Edit.png" style="width: 314px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/391659i08C5A52D5552BA15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Excel Edit.png" alt="Excel Edit.png" /&gt;&lt;/span&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="http://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;
&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>Fri, 18 Aug 2017 20:05:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312231#M266454</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-08-18T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312241#M266455</link>
      <description>&lt;P&gt;Yes! Thanks MechMachineMan!&lt;BR /&gt;&lt;BR /&gt;Just a few follow up questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How do I set the path of the excel file to be the Drawing File Name plus "_Barlist"?&lt;/P&gt;&lt;P&gt;2. How do I set the sheet to be a specific sheet?&lt;/P&gt;&lt;P&gt;3. How do i run this in macro iLogic so that it will be run before i save?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:06:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312241#M266455</guid>
      <dc:creator>ivan.liu</dc:creator>
      <dc:date>2017-08-18T20:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312545#M266456</link>
      <description>&lt;P&gt;So I was able to answer my own questions and end up with the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;Public Sub InsertQuantitiesTable()&lt;BR /&gt;'Set a reference to the active drawing document&lt;BR /&gt;Dim oDrawDoc As DrawingDocument&lt;BR /&gt;Set oDrawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;&lt;BR /&gt;'Find Drawing File Path without Extension&lt;BR /&gt;Dim Path As String&lt;BR /&gt;Path = ThisApplication.ActiveDocument.FullFileName&lt;BR /&gt;Path = Left(Path, Len(Path) - 4)&lt;/P&gt;&lt;P&gt;'Set a reference to the sheet&lt;BR /&gt;Dim oActiveSheet As Sheet&lt;BR /&gt;Set oActiveSheet = oDrawDoc.Sheets("SEGMENT DIMENSION I:2")&lt;BR /&gt;&lt;BR /&gt;'Set the placement point for the table&lt;BR /&gt;Dim oPoint As Point2d&lt;BR /&gt;Set oPoint = ThisApplication.TransientGeometry.CreatePoint2d(24, 10)&lt;BR /&gt;&lt;BR /&gt;'Create the table by specifying the source Excel file&lt;BR /&gt;'This assumes that the first row in the Excel sheet specifies the column headers&lt;BR /&gt;'You can specify a different row using the last argument of the AddExcelTable method&lt;BR /&gt;Dim oExcelTable As CustomTable&lt;BR /&gt;Set oExcelTable = oActiveSheet.CustomTables.AddExcelTable(Path &amp;amp; "_QUANTITIES.xlsx", oPoint, "ESTIMATED QUANTITIES PER SEGMENT")&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, my table is not formatted as it is in excel. my first column needs to be widened. is there any way to add a input for the column width in the code above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 22:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312545#M266456</guid>
      <dc:creator>ivan.liu</dc:creator>
      <dc:date>2017-08-18T22:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to create general table from excel file</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312804#M266457</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-B8D1B7BF-6534-4E72-809C-7887FE8B9A09" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-B8D1B7BF-6534-4E72-809C-7887FE8B9A09&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub InsertQuantitiesTable()
'Set a reference to the active drawing document
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument

'Find Drawing File Path without Extension
Dim Path As String
Path = ThisApplication.ActiveDocument.FullFileName
Path = Left(Path, Len(Path) - 4)

'Set a reference to the sheet
Dim oActiveSheet As Sheet
Set oActiveSheet = oDrawDoc.Sheets("SEGMENT DIMENSION I:2")

'Set the placement point for the table
Dim oPoint As Point2d
Set oPoint = ThisApplication.TransientGeometry.CreatePoint2d(24, 10)

'Create the table by specifying the source Excel file
'This assumes that the first row in the Excel sheet specifies the column headers
'You can specify a different row using the last argument of the AddExcelTable method
Dim oExcelTable As CustomTable
Set oExcelTable = oActiveSheet.CustomTables.AddExcelTable(Path &amp;amp; "_QUANTITIES.xlsx", oPoint, "ESTIMATED QUANTITIES PER SEGMENT")

'Use the integer of the column
oExcelTable.Columns(1).Width = 22

End Sub&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Aug 2017 06:15:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-to-create-general-table-from-excel-file/m-p/7312804#M266457</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-19T06:15:55Z</dc:date>
    </item>
  </channel>
</rss>

