Hi @BrandonLee_Innovex. Here is an example iLogic rule you can try out, and alter as needed.
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("A Drawing document must be active for this code to work. Exiting.", vbCritical, "")
Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets As Inventor.Sheets = oDDoc.Sheets
Dim oASheet As Inventor.Sheet = oSheets.Item(1)
Dim oData As New List(Of String)
For Each oSheet As Inventor.Sheet In oSheets
oData.Add(oSheet.Name.Split(":").Last)
oData.Add(oSheet.Name.Split(":").First)
Next
Dim sTitle As String = "TABLE OF CONTENTS"
Dim Pt2d As Inventor.Point2d = ThisApplication.TransientGeometry.CreatePoint2d(0, 0)
Dim iCols As Integer = 2
Dim iRows As Integer = oSheets.Count
Dim oColTitles() As String = {"SHEET", "CONTENTS" }
Dim oContents() As String = oData.ToArray
Dim oCTable As Inventor.CustomTable
oCTable = oASheet.CustomTables.Add(sTitle, Pt2d, iCols, iRows, oColTitles, oContents)
oCTable.HeadingPlacement = HeadingPlacementEnum.kHeadingAtTop
oCTable.ShowTitle = True
oCTable.TableDirection = TableDirectionEnum.kTopDownDirection
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)