<?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: How to set column width using iLogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669662#M175360</link>
    <description>&lt;P&gt;The original post contained code that is adding a '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-CustomTable" target="_blank" rel="noopener"&gt;CustomTable&lt;/A&gt;' to a drawing, not a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PartsList" target="_blank" rel="noopener"&gt;PartsList&lt;/A&gt;.&amp;nbsp; When we use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=CustomTables_AddExcelTable" target="_blank" rel="noopener"&gt;CustomTables.AddExcelTable&lt;/A&gt;&amp;nbsp;method, we do not have any initial opportunity to specify how wide we want the columns to be, unlike when we use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=CustomTables_Add" target="_blank" rel="noopener"&gt;CustomTables.Add&lt;/A&gt;&amp;nbsp;method.&amp;nbsp; So, when we have used the AddExcelTable method, we capture the new CustomTable object which that method creates for us as the value of a CustomTable Type variable.&amp;nbsp; Then, we can set the column widths individually, following the following object/property trail:&lt;/P&gt;
&lt;P&gt;CustomTable.Columns.Item(index).&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Column_Width" target="_blank" rel="noopener"&gt;Width&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;('index' can be replaced with an Integer indicating its Index in the collection, or the column header/title)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;That Width Property is expecting a Double type value (number with decimal point).&amp;nbsp; Its value will likely be interpreted as centimeters, since that is the 'database' (system default) units for distance, instead of 'document units' (if different).&amp;nbsp; So, we could iterate through Each column in the CustomTable.Columns collection, and attempt to set them all to the same value, or access them individually by their column header/title, and set a different, specific value to each one.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 13:57:35 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2025-06-06T13:57:35Z</dc:date>
    <item>
      <title>How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668239#M175340</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 and I found this code in the forum and it appears to work perfectly but I cannot figure out how to get the columns to fit the text width automatically. When the table imports it wraps the text onto another row when it's too wide for the cell.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
    
    Dim oActiveSheet As Sheet = oDrawDoc.ActiveSheet
    
    ' Create the placement point for the table
    Dim oPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(36.6,11)
    
    Dim oExcelTable As CustomTable = oActiveSheet.CustomTables.AddExcelTable("C:\Temp\test.xls", oPoint, "Excel Table")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Can someone tell me how to modify the code so that the column width automatically fits to the width of the text when they are imported into the drawing or can this only be a manual process of widening the columns?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 17:13:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668239#M175340</guid>
      <dc:creator>harveylanc</dc:creator>
      <dc:date>2025-06-05T17:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668587#M175343</link>
      <description>&lt;P&gt;This code sets my parts list column widths to best fit (also borrowed from this forum a while ago).&lt;/P&gt;&lt;P&gt;Does this one do the trick?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'Public Sub FitColumnsWidth(oPartsList As PartsList)&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDrawingDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"A Drawing Document must be active for this rule ("&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;RuleName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;") to work. Exiting."&lt;/SPAN&gt;,&lt;SPAN&gt;vbOKOnly&lt;/SPAN&gt;+&lt;SPAN&gt;vbCritical&lt;/SPAN&gt;, &lt;SPAN&gt;"WRONG DOCUMENT TYPE"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTG&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Sheet&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oPList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsList&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt; = &lt;SPAN&gt;oTG&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePoint2d&lt;/SPAN&gt;(0,0)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTempGNote&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;GeneralNote&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingNotes&lt;/SPAN&gt;.&lt;SPAN&gt;GeneralNotes&lt;/SPAN&gt;.&lt;SPAN&gt;AddFitted&lt;/SPAN&gt;(&lt;SPAN&gt;oPPoint&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;DataTextStyle&lt;/SPAN&gt;)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oColQty&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = &lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListColumns&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oWidths&lt;/SPAN&gt;(&lt;SPAN&gt;oColQty&lt;/SPAN&gt;) &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
			&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; = 0 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oColQty&lt;/SPAN&gt; - 1
				&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNext&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = &lt;SPAN&gt;i&lt;/SPAN&gt; + 1
				&lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt; = &lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListColumns&lt;/SPAN&gt;(&lt;SPAN&gt;oNext&lt;/SPAN&gt;).&lt;SPAN&gt;Title&lt;/SPAN&gt;
				&lt;SPAN&gt;oWidths&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;) = &lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;FittedTextWidth&lt;/SPAN&gt;
				&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsListRow&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListRows&lt;/SPAN&gt;
					&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt;.&lt;SPAN&gt;Visible&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
						&lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt; = &lt;SPAN&gt;oRow&lt;/SPAN&gt;(&lt;SPAN&gt;oNext&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
						&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;FittedTextWidth&lt;/SPAN&gt; &amp;gt; &lt;SPAN&gt;oWidths&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
							&lt;SPAN&gt;oWidths&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;) = &lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;FittedTextWidth&lt;/SPAN&gt;
						&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
					&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
				&lt;SPAN&gt;Next&lt;/SPAN&gt;
				&lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListColumns&lt;/SPAN&gt;(&lt;SPAN&gt;oNext&lt;/SPAN&gt;).&lt;SPAN&gt;Width&lt;/SPAN&gt; = &lt;SPAN&gt;oWidths&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;) + &lt;SPAN&gt;oPList&lt;/SPAN&gt;.&lt;SPAN&gt;DataTextStyle&lt;/SPAN&gt;.&lt;SPAN&gt;FontSize&lt;/SPAN&gt;
			&lt;SPAN&gt;Next&lt;/SPAN&gt;
			&lt;SPAN&gt;oTempGNote&lt;/SPAN&gt;.&lt;SPAN&gt;Delete&lt;/SPAN&gt;()
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;'https://forums.autodesk.com/t5/inventor-programming-ilogic/auto-fit-columns-in-parts-list/td-p/9647846/page/2_MESSAGE37&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 20:47:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668587#M175343</guid>
      <dc:creator>harvey3ELEA</dc:creator>
      <dc:date>2025-06-05T20:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668603#M175344</link>
      <description>&lt;P&gt;Hi harvey3ELEA,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be honest, I am so new to iLogic I do not know how to merge the 2 pieces of code together to make it do a "best fit". I'll take a few attempts at it and let you know for sure.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 21:08:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668603#M175344</guid>
      <dc:creator>harveylanc</dc:creator>
      <dc:date>2025-06-05T21:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668724#M175346</link>
      <description>&lt;P&gt;Try this one. You have to make multi parameter PartsListStyle with different table styles, something like Laser, Plasma, Router etc... and when you run this rule it will place into right hand upper corner parts list.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()

&lt;SPAN&gt;'Declare local variables&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawingView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPlacementPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartsList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartsList&lt;/SPAN&gt; 
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBorder&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Border&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPlaceX&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPlaceY&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt;

&lt;SPAN&gt;'initialize variables&lt;/SPAN&gt;
&lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oSheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;
&lt;SPAN&gt;oDrawingView&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;(1)
&lt;SPAN&gt;oBorder&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Border&lt;/SPAN&gt;

&lt;SPAN&gt;'user input - select parts list style&lt;/SPAN&gt;
&lt;SPAN&gt;'oStyle = InputListBox("Choose Parts List Style", MultiValue.List("PartsListStyle"), "Custom Parts List (CUSTOMER)","Parts List Style", "List Prompt") &lt;/SPAN&gt;
&lt;SPAN&gt;oStyle&lt;/SPAN&gt; = &lt;SPAN&gt;InputListBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Choose Parts List Style"&lt;/SPAN&gt;, &lt;SPAN&gt;MultiValue&lt;/SPAN&gt;.&lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;"PartsListStyle"&lt;/SPAN&gt;),&lt;SPAN&gt;"Parts List Style"&lt;/SPAN&gt;, &lt;SPAN&gt;"List Prompt"&lt;/SPAN&gt;) 

&lt;SPAN&gt;'create parts list&lt;/SPAN&gt;
&lt;SPAN&gt;oPartsList&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;PartsLists&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawingView&lt;/SPAN&gt;, &lt;SPAN&gt;oBorder&lt;/SPAN&gt;.&lt;SPAN&gt;RangeBox&lt;/SPAN&gt;.&lt;SPAN&gt;MinPoint&lt;/SPAN&gt;)
&lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;Style&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;PartsListStyles&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oStyle&lt;/SPAN&gt;)

&lt;SPAN&gt;'reposition parts list to top left&lt;/SPAN&gt;
&lt;SPAN&gt;oPlaceX&lt;/SPAN&gt; = &lt;SPAN&gt;oBorder&lt;/SPAN&gt;.&lt;SPAN&gt;RangeBox&lt;/SPAN&gt;.&lt;SPAN&gt;MaxPoint&lt;/SPAN&gt;.&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;SPAN&gt;' - (oPartsList.RangeBox.MaxPoint.X + oPartsList.RangeBox.MinPoint.X)'+(1.27)&lt;/SPAN&gt;
&lt;SPAN&gt;oPlaceY&lt;/SPAN&gt; = &lt;SPAN&gt;oBorder&lt;/SPAN&gt;.&lt;SPAN&gt;RangeBox&lt;/SPAN&gt;.&lt;SPAN&gt;MaxPoint&lt;/SPAN&gt;.&lt;SPAN&gt;Y&lt;/SPAN&gt; 
&lt;SPAN&gt;oPlacementPoint&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePoint2d&lt;/SPAN&gt;(&lt;SPAN&gt;oPlaceX&lt;/SPAN&gt;,&lt;SPAN&gt;oPlaceY&lt;/SPAN&gt;)
&lt;SPAN&gt;oPartsList&lt;/SPAN&gt;.&lt;SPAN&gt;Position&lt;/SPAN&gt; = &lt;SPAN&gt;oPlacementPoint&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;





 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 23:52:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13668724#M175346</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2025-06-05T23:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669381#M175351</link>
      <description>&lt;P&gt;No need to merge the code I posted with anything else.&lt;/P&gt;&lt;P&gt;Simply copy that code into a "Create New External Rule" (right click on Standard Directories under iLogic tab in model tree) with a saved name you prefer.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 11:36:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669381#M175351</guid>
      <dc:creator>harvey3ELEA</dc:creator>
      <dc:date>2025-06-06T11:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669653#M175359</link>
      <description>&lt;P&gt;Thanks everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your explanations helped me to understand more about how it works. The code GosponZ provided appears to work fine however, the code I originally posted allows me to use an Excel spreadsheet as the source for the data in the table which I liked. I know that Inventor has the ability to link the spreadsheet during the general table insertion but I was trying to automate it. I will keep testing the code with modifications and see if I can move in the direction of a list and form so to speak so I can learn more. I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 13:53:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669653#M175359</guid>
      <dc:creator>harveylanc</dc:creator>
      <dc:date>2025-06-06T13:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669662#M175360</link>
      <description>&lt;P&gt;The original post contained code that is adding a '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-CustomTable" target="_blank" rel="noopener"&gt;CustomTable&lt;/A&gt;' to a drawing, not a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PartsList" target="_blank" rel="noopener"&gt;PartsList&lt;/A&gt;.&amp;nbsp; When we use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=CustomTables_AddExcelTable" target="_blank" rel="noopener"&gt;CustomTables.AddExcelTable&lt;/A&gt;&amp;nbsp;method, we do not have any initial opportunity to specify how wide we want the columns to be, unlike when we use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=CustomTables_Add" target="_blank" rel="noopener"&gt;CustomTables.Add&lt;/A&gt;&amp;nbsp;method.&amp;nbsp; So, when we have used the AddExcelTable method, we capture the new CustomTable object which that method creates for us as the value of a CustomTable Type variable.&amp;nbsp; Then, we can set the column widths individually, following the following object/property trail:&lt;/P&gt;
&lt;P&gt;CustomTable.Columns.Item(index).&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Column_Width" target="_blank" rel="noopener"&gt;Width&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;('index' can be replaced with an Integer indicating its Index in the collection, or the column header/title)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;That Width Property is expecting a Double type value (number with decimal point).&amp;nbsp; Its value will likely be interpreted as centimeters, since that is the 'database' (system default) units for distance, instead of 'document units' (if different).&amp;nbsp; So, we could iterate through Each column in the CustomTable.Columns collection, and attempt to set them all to the same value, or access them individually by their column header/title, and set a different, specific value to each one.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 13:57:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669662#M175360</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-06-06T13:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669747#M175362</link>
      <description>&lt;P&gt;Thanks &lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054" target="_self"&gt;&lt;SPAN class=""&gt;WCrihfield&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That makes sense. I was able to modify my original code and that set the width as you suggested. This is the code and it works!&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
    
    Dim oActiveSheet As Sheet = oDrawDoc.ActiveSheet
    
    ' Create the placement point for the table
    Dim oPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(36.6,11)
    
    Dim oExcelTable As CustomTable = oActiveSheet.CustomTables.AddExcelTable("C:\Temp\test.xls", oPoint, "Excel Table")
   'Use the integer of the column
oExcelTable.Columns(1).Width = 4.445
oExcelTable.Columns(2).Width = 7.62
   ' Hide the table title
    oExcelTable.ShowTitle = False&lt;/LI-CODE&gt;&lt;P&gt;Do you know if it is possible to have to automatically place in the upper right corner of the border or do I need to keep adjusting the "CreatePoint2d" to get it there or just manually drag it in place so it snaps?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 14:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669747#M175362</guid>
      <dc:creator>harveylanc</dc:creator>
      <dc:date>2025-06-06T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to set column width using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669774#M175363</link>
      <description>&lt;P&gt;It has been a while since I created a CustomTable by code, but I believe their initial placement location goes by its upper, left corner.&amp;nbsp; So, if you need the upper, right corner of the CustomTable to be at the upper, right corner of the drawing sheet's border, some measuring, then repositioning would need to be involved, after it was placed on the sheet somewhere else.&amp;nbsp; We can get that location using the following object/property trail:&lt;/P&gt;
&lt;P&gt;Sheet.Border.RangeBox.MaxPoint&lt;/P&gt;
&lt;P&gt;...where Sheet is the drawing sheet object, and Max Point gives us an Inventor.Point2d object, which will be at the upper, right (max in positive X direction, and max in positive Y direction) corner of the border's sketch geometry.&lt;/P&gt;
&lt;P&gt;So, place the table somewhere random first, then use the CustomTable.RangeBox.MaxPoint property to get its upper, right corner position, then measure how far that is from the upper, right corner of the border, then reposition the table using a 'new' modified point object, that resulted from that math from the X &amp;amp; Y values of the points.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=CustomTable_RangeBox" target="_blank" rel="noopener"&gt;CustomTable.RangeBox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Border_RangeBox" target="_blank" rel="noopener"&gt;Border.RangeBox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Box2d" target="_blank" rel="noopener"&gt;Box2d&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Box2d_MaxPoint" target="_blank" rel="noopener"&gt;Box2d.MaxPoint&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Point2d" target="_blank" rel="noopener"&gt;Point2d&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 14:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-set-column-width-using-ilogic/m-p/13669774#M175363</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-06-06T14:48:38Z</dc:date>
    </item>
  </channel>
</rss>

