<?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: Drawing sheet list with more properties in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085586#M5186</link>
    <description>&lt;P&gt;Just a tip...&lt;/P&gt;
&lt;P&gt;Be careful using a 'For Each...Next' type of loop, with a separate Index counter, if that Index is important.&amp;nbsp; When iterating through a collection that way, the order of that iteration is not guaranteed.&amp;nbsp; If Index is important, then you should use a 'For i = # to #...Next' type of loop.&amp;nbsp; That ensures that the items will be encountered in their 'natural' order.&amp;nbsp; In a drawing, the Sheets collection seems to be ordered a bit differently than most types of collections, because the 'sheet number' will always be in the order they are seen in the model browser tree.&amp;nbsp; If you physically drag the first sheet down to the next position after the current sheet 3, it will become Sheet 3 itself, because the original sheet 2 will become sheet 1, and the original sheet 3 will become sheet 2.&amp;nbsp; The first part of the sheet's name will stay the same, but the Index number is managed automatically by Inventor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you are likely aware of this, but there is a document level revision level (in the standard iProperties), then there is also a sheet level revision level (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Revision" target="_blank" rel="noopener"&gt;Sheet.Revision&lt;/A&gt;&amp;nbsp;).&amp;nbsp; However, sheets do not have their own &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PropertySets" target="_blank" rel="noopener"&gt;PropertySets&lt;/A&gt;, like Documents do.&amp;nbsp; So, if you have a different model file being referenced on each sheet of your drawing, and have the description of that model file in the title block of that sheet, but want that information to be shown in a table cell on the first sheet, it will be relatively complicated to gather that information in the first place, and will likely be 'static' information within the table cell, instead of 'linked'.&amp;nbsp; Because it would require iterating through each TextBox within the sketch, within the definition of each title block, and somehow knowing which TextBox is for which property (because a TextBox does not have a name), and retrieving its 'Text' value.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2024 13:47:12 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2024-10-15T13:47:12Z</dc:date>
    <item>
      <title>Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085234#M5183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible to make iLogic that would generate a sheet list on the first sheet and also use, for example, description custom properties from each sheet?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 10:55:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085234#M5183</guid>
      <dc:creator>kresh.bell</dc:creator>
      <dc:date>2024-10-15T10:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085348#M5184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4988405"&gt;@kresh.bell&lt;/a&gt;&amp;nbsp;.&amp;nbsp;Yes, it is possible. Using the &lt;A title="help.autodesk.com" href="https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=GUID-Sheets" target="_blank" rel="noopener"&gt;DrawingDocument.Sheets&lt;/A&gt; method you can get all your sheets and make a list of them. An example of solving a problem: &lt;A title="forums.autodesk.com" href="https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-revision-sheet-number-and-sheet-name-in-a-table/td-p/11262111" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;, &lt;A title="forums.autodesk.com" href="https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-ilogic-sheet-list/td-p/12317803" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;, &lt;A title="github.com" href="https://github.com/bretleasure/SheetList" target="_blank" rel="noopener"&gt;GitHub&lt;/A&gt;.&lt;BR /&gt;We can help you implement a more personalized iLogic code if you share with us more information about your case and your needs.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 12:10:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085348#M5184</guid>
      <dc:creator>Andrii_Humeniuk</dc:creator>
      <dc:date>2024-10-15T12:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085448#M5185</link>
      <description>&lt;P&gt;This is ok for me iLogic.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet, oIndexSheet As Sheet
Dim sSheetName, sSheetNo, sSheetRev As String
Dim oTitleBlock As TitleBlock
Dim oTextBox As Inventor.TextBox

oIndexSheet = oDoc.Sheets(1)'In order to put table on sheet 1

'[Table Setup
Dim oColumns, oRows, oCells, i As Integer
oColumns = 3
i = 0
oRows = oDoc.Sheets.Count
oCells = oColumns * oRows 'calculate number of cells

Dim oContents(oCells - 1) As String 'Minus 1 as array will start from zero
Dim oTitles(oColumns - 1) As String 'Minus 1 as array will start from zero
'Hardcoded titles 
oTitles(2) = "DESCRIPTION"
oTitles(1) = "SHEET #"
oTitles(0) = "SHEET REV"
']

iCount = 1
For Each oSheet In oDoc.Sheets

	sSplit = Split(oSheet.Name, ":")

	Try : sSheetName = sSplit(0) : Catch : sSheetName = oSheet.Name : End Try
	sSheetNo = iCount
		
	sSheetRev = oSheet.Revision

	Try 'to get title block
		oTitleBlock = oSheet.TitleBlock

		For Each oTextBox In oTitleBlock.Definition.Sketch.TextBoxes
			If oTextBox.Text = "SHEET-NAME" Then
				Call oTitleBlock.SetPromptResultText(oTextBox, sSheetName)
			End If
		Next
	Catch 
		'handle error when no title block is on the sheet
	End Try
	
	'[Table Data
	oContents(i) = sSheetRev 'Add to string 
	i = i + 1
	oContents(i) = sSheetNo  'Add to string 
	i = i + 1
	oContents(i) = sSheetName  'Add to string 
	i = i + 1
	']

	iCount = iCount +1
Next

Dim InsP As Point2d
InsP = ThisApplication.TransientGeometry.CreatePoint2d(10, 15)

Dim oCustomTable As CustomTable
oTableName = "DRAWING INDEX"

Try : oIndexSheet.CustomTables.Item(1).Delete : Catch : End Try

oCustomTable = oIndexSheet.CustomTables.Add(oTableName, InsP, oColumns, oRows, oTitles, oContents)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use custom properties from the title block to populate the Description column?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kreshbell_0-1728996811449.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1421642i2940B410BCC47BE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kreshbell_0-1728996811449.png" alt="kreshbell_0-1728996811449.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also Revision number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 12:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085448#M5185</guid>
      <dc:creator>kresh.bell</dc:creator>
      <dc:date>2024-10-15T12:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085586#M5186</link>
      <description>&lt;P&gt;Just a tip...&lt;/P&gt;
&lt;P&gt;Be careful using a 'For Each...Next' type of loop, with a separate Index counter, if that Index is important.&amp;nbsp; When iterating through a collection that way, the order of that iteration is not guaranteed.&amp;nbsp; If Index is important, then you should use a 'For i = # to #...Next' type of loop.&amp;nbsp; That ensures that the items will be encountered in their 'natural' order.&amp;nbsp; In a drawing, the Sheets collection seems to be ordered a bit differently than most types of collections, because the 'sheet number' will always be in the order they are seen in the model browser tree.&amp;nbsp; If you physically drag the first sheet down to the next position after the current sheet 3, it will become Sheet 3 itself, because the original sheet 2 will become sheet 1, and the original sheet 3 will become sheet 2.&amp;nbsp; The first part of the sheet's name will stay the same, but the Index number is managed automatically by Inventor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you are likely aware of this, but there is a document level revision level (in the standard iProperties), then there is also a sheet level revision level (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Revision" target="_blank" rel="noopener"&gt;Sheet.Revision&lt;/A&gt;&amp;nbsp;).&amp;nbsp; However, sheets do not have their own &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PropertySets" target="_blank" rel="noopener"&gt;PropertySets&lt;/A&gt;, like Documents do.&amp;nbsp; So, if you have a different model file being referenced on each sheet of your drawing, and have the description of that model file in the title block of that sheet, but want that information to be shown in a table cell on the first sheet, it will be relatively complicated to gather that information in the first place, and will likely be 'static' information within the table cell, instead of 'linked'.&amp;nbsp; Because it would require iterating through each TextBox within the sketch, within the definition of each title block, and somehow knowing which TextBox is for which property (because a TextBox does not have a name), and retrieving its 'Text' value.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:47:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085586#M5186</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-10-15T13:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085617#M5187</link>
      <description>&lt;P&gt;If I understood you correctly. Your code should look like this:&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet, oIndexSheet As Sheet
Dim sSheetName, sSheetNo, sSheetRev As String
Dim oTitleBlock As TitleBlock
Dim oTextBox As Inventor.TextBox

oIndexSheet = oDoc.Sheets(1)'In order to put table on sheet 1

'[Table Setup
Dim oColumns, oRows, oCells, i As Integer
oColumns = 3
i = 0
oRows = oDoc.Sheets.Count
oCells = oColumns * oRows 'calculate number of cells

Dim oContents(oCells - 1) As String 'Minus 1 as array will start from zero
Dim oTitles(oColumns - 1) As String 'Minus 1 as array will start from zero
'Hardcoded titles 
oTitles(2) = "DESCRIPTION"
oTitles(1) = "SHEET NAME"
oTitles(0) = "SHEET №"
']

iCount = 1
For Each oSheet In oDoc.Sheets

	sSplit = Split(oSheet.Name, ":")

	Try : sSheetName = sSplit(0) : Catch : sSheetName = oSheet.Name : End Try
	sSheetNo = iCount
		
	sSheetRev = oSheet.Revision

	Try 'to get title block
		Dim oTB As TitleBlock = oSheet.TitleBlock
		Dim oTextBoxes As TextBoxes = oTB.Definition.Sketch.TextBoxes
		For Each oTBox As Inventor.TextBox In oTextBoxes
			Dim sData As String = oTB.GetResultText(oTBox)
			If Not oTBox.Text = "&amp;lt;DESCRIPTION&amp;gt;" Then Continue For
			sSheetRev = oTB.GetResultText(oTBox)
		Next
	Catch 
		'handle error when no title block is on the sheet
	End Try
	
	'[Table Data
	oContents(i) = sSheetNo 'Add to string 
	i = i + 1
	oContents(i) = sSheetName  'Add to string 
	i = i + 1
	oContents(i) = sSheetRev  'Add to string 
	i = i + 1
	']

	iCount = iCount +1
Next

Dim InsP As Point2d
InsP = ThisApplication.TransientGeometry.CreatePoint2d(10, 15)

Dim oCustomTable As CustomTable
oTableName = "DRAWING INDEX"

Try : oIndexSheet.CustomTables.Item(1).Delete : Catch : End Try

oCustomTable = oIndexSheet.CustomTables.Add(oTableName, InsP, oColumns, oRows, oTitles, oContents)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Oct 2024 14:05:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085617#M5187</guid>
      <dc:creator>Andrii_Humeniuk</dc:creator>
      <dc:date>2024-10-15T14:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085704#M5188</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13518190"&gt;@Andrii_Humeniuk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, sorry for delay. yes, it works well. exept description column. is it possible instead desciption add revision number? also, if I want add some column, for manual populate, what can I do?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 14:44:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13085704#M5188</guid>
      <dc:creator>kresh.bell</dc:creator>
      <dc:date>2024-10-15T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13089929#M5189</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13518190"&gt;@Andrii_Humeniuk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please, can you add 4 columns in iLogic that do not have custom properties, they are free to fill? Text1, Text2, Text3 and Text4?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 04:25:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13089929#M5189</guid>
      <dc:creator>kresh.bell</dc:creator>
      <dc:date>2024-10-17T04:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13090265#M5190</link>
      <description>&lt;P&gt;Sorry for the delay. Changed the 3rd column from the description column to the revision number column and added an additional 4 columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim oInvApp As Inventor.Application = ThisApplication
Dim oDoc As DrawingDocument = oInvApp.ActiveDocument

Dim oSheet, oIndexSheet As Sheet
Dim sSheetName, sSheetNo, sSheetRev As String
Dim oTitleBlock As TitleBlock
Dim oTextBox As Inventor.TextBox

oIndexSheet = oDoc.Sheets(1)'In order to put table on sheet 1

'[Table Setup
Dim oColumns, oRows, oCells, i As Integer
oColumns = 7
i = 0
oRows = oDoc.Sheets.Count
oCells = oColumns * oRows 'calculate number of cells

Dim oContents(oCells - 1) As String 'Minus 1 as array will start from zero
Dim oTitles(oColumns - 1) As String 'Minus 1 as array will start from zero
'Hardcoded titles 
oTitles(6) = "Text4"
oTitles(5) = "Text3"
oTitles(4) = "Text2"
oTitles(3) = "Text1"
oTitles(2) = "REVISION"
oTitles(1) = "SHEET NAME"
oTitles(0) = "SHEET №"
']

iCount = 1
For Each oSheet In oDoc.Sheets

	sSplit = Split(oSheet.Name, ":")

	Try : sSheetName = sSplit(0) : Catch : sSheetName = oSheet.Name : End Try
	sSheetNo = iCount
		
	sSheetRev = oSheet.Revision
	
	'[Table Data
	oContents(i) = sSheetNo 'Add to string 
	i += 1
	oContents(i) = sSheetName  'Add to string 
	i += 1
	oContents(i) = sSheetRev  'Add to string 
	i += 1
	oContents(i) = ""  'Add to string Text1
	i += 1
	oContents(i) = ""  'Add to string Text2
	i += 1
	oContents(i) = ""  'Add to string Text3
	i += 1
	oContents(i) = ""  'Add to string Text4
	i += 1
	']

	iCount += 1
Next

Dim InsP As Point2d = oInvApp.TransientGeometry.CreatePoint2d(10, 15)

Dim oCustomTable As CustomTable
oTableName = "DRAWING INDEX"

Try : oIndexSheet.CustomTables.Item(1).Delete : Catch : End Try

oCustomTable = oIndexSheet.CustomTables.Add(oTableName, InsP, oColumns, oRows, oTitles, oContents)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 17 Oct 2024 07:47:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13090265#M5190</guid>
      <dc:creator>Andrii_Humeniuk</dc:creator>
      <dc:date>2024-10-17T07:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13090503#M5191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13518190"&gt;@Andrii_Humeniuk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works great, great job. Thank you very much. Revision number is not filled in automatically, but somehow I can do without it&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 09:31:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13090503#M5191</guid>
      <dc:creator>kresh.bell</dc:creator>
      <dc:date>2024-10-17T09:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13108082#M5192</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;if you add a revision label to the sheet, it will be overwritten in the revision table.&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="rev_01.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1425849iF70E05681BF6EAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rev_01.png" alt="rev_01.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rev_02.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1425850iA66FF342CCCC844F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rev_02.png" alt="rev_02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 11:59:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13108082#M5192</guid>
      <dc:creator>DeptaM</dc:creator>
      <dc:date>2024-10-25T11:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing sheet list with more properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13329695#M5193</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13518190" target="_blank"&gt;@Andrii_Humeniuk&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;is it possible to add the date of the revision and the name of the designer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 09:13:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/drawing-sheet-list-with-more-properties/m-p/13329695#M5193</guid>
      <dc:creator>rcF4Z23</dc:creator>
      <dc:date>2025-02-20T09:13:04Z</dc:date>
    </item>
  </channel>
</rss>

