<?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: Multidimensional Array iLogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090843#M102209</link>
    <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; I was actually able to get my original code (see below) to work. I identified the wrong problem. The problem wasn't the array, it was putting that array in a custom table (see line 23). My desired output is attached (see screen shot&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table screenshot.png" style="width: 645px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/688356i36EE2174E82733AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="table screenshot.png" alt="table screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;Sub Main 

        Dim oDrawDoc 		As DrawingDocument
	Dim oSheet 	        As Sheet
	Dim oTitles() 		As String
	Dim oContents() 	As String
	Dim oCustomTable        As CustomTable

    oDrawDoc = ThisDoc.Document
    oSheet = oDrawDoc.ActiveSheet
'    oTitles = {"DWG TYPE", "FAB STATUS", "DRAWING NUMBER", "REV. NO.", "DESCRIPTION" }
	oTitles = {"DWG TYPE", "FAB STATUS"}
    
Dim MyArray(0 To 1, 0 To 1) As Object
MyArray(0, 0) = "00"
MyArray(0, 1) = "01"
MyArray(1, 1) = "11"
MyArray(1, 0) = "10"

MsgBox("myarray(0,0) = " &amp;amp; myarray(0,0))

	'	oCustomTable = oPSheet.CustomTables.Add("PRINT REQUEST FORM", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 3, 4, oTitles, oContents)	
		oCustomTable = oSheet.CustomTables.Add("Sample Table", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 2, 2, oTitles,MyArray) '''here's my problem line of code

end sub&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Oct 2019 20:31:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-16T20:31:17Z</dc:date>
    <item>
      <title>Multidimensional Array iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9087895#M102170</link>
      <description>&lt;P&gt;I'm trying to figure out how to create an empty 2D array in iLogic and then fill the array like a table. The VBA equivalent would go something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim MyArray(0 To 1, 0 To 1) As String&lt;BR /&gt;MyArray(0, 0) = "00"&lt;BR /&gt;MyArray(0, 1) = "01"&lt;BR /&gt;MyArray(1, 1) = "11"&lt;BR /&gt;MyArray(1, 0) = "10"&lt;/P&gt;&lt;P&gt;MsgBox MyArray(0, 1) 'outputs string "01"&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 16:48:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9087895#M102170</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-15T16:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional Array iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090791#M102208</link>
      <description>&lt;P&gt;The ilogic/vb.net equivalent:&lt;/P&gt;&lt;PRE&gt;Dim myArray(1,1) As String
myArray(0,0) = "00"
myArray(0,1) = "01"
myArray(1,0) = "10"
myArray(1,1) = "11"
MsgBox( myArray(0, 1)) 'outputs string "01"&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2019 20:07:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090791#M102208</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2019-10-16T20:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional Array iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090843#M102209</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; I was actually able to get my original code (see below) to work. I identified the wrong problem. The problem wasn't the array, it was putting that array in a custom table (see line 23). My desired output is attached (see screen shot&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table screenshot.png" style="width: 645px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/688356i36EE2174E82733AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="table screenshot.png" alt="table screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;Sub Main 

        Dim oDrawDoc 		As DrawingDocument
	Dim oSheet 	        As Sheet
	Dim oTitles() 		As String
	Dim oContents() 	As String
	Dim oCustomTable        As CustomTable

    oDrawDoc = ThisDoc.Document
    oSheet = oDrawDoc.ActiveSheet
'    oTitles = {"DWG TYPE", "FAB STATUS", "DRAWING NUMBER", "REV. NO.", "DESCRIPTION" }
	oTitles = {"DWG TYPE", "FAB STATUS"}
    
Dim MyArray(0 To 1, 0 To 1) As Object
MyArray(0, 0) = "00"
MyArray(0, 1) = "01"
MyArray(1, 1) = "11"
MyArray(1, 0) = "10"

MsgBox("myarray(0,0) = " &amp;amp; myarray(0,0))

	'	oCustomTable = oPSheet.CustomTables.Add("PRINT REQUEST FORM", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 3, 4, oTitles, oContents)	
		oCustomTable = oSheet.CustomTables.Add("Sample Table", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 2, 2, oTitles,MyArray) '''here's my problem line of code

end sub&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2019 20:31:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090843#M102209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-16T20:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional Array iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090884#M102211</link>
      <description>&lt;P&gt;it's maby a bit strange but you dont need a multi dimension array. The help states:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Optional input String array that specifies the contents of the table. The number of Strings must match the number of cells in the table, else an error will occur. This array of String is used to sequentially populate each row of the table&lt;/BLOCKQUOTE&gt;&lt;P&gt;try the following array&lt;/P&gt;&lt;PRE&gt;Dim myArray(3) As String
myArray(0) = "00"
myArray(1) = "01"
myArray(2) = "10"
myArray(3) = "11"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 20:55:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090884#M102211</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2019-10-16T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional Array iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090886#M102212</link>
      <description>&lt;P&gt;I think I see what you're saying. It's a little counter intuitive. A multidimensional array is NOT required. The TOTAL number of cells must match the TOTAL number of data cells excluding the title cells. Thank you for clarifying that.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 20:58:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multidimensional-array-ilogic/m-p/9090886#M102212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-16T20:58:24Z</dc:date>
    </item>
  </channel>
</rss>

