It is possible to get access to revision table from iLogic rule using calls to Inventor API objects. The following rule returns title and number of rows in the first revision table on the active sheet.
Dim oDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDoc.ActiveSheet
Dim oRevTable As RevisionTable = oSheet.RevisionTables.Item(1)
MsgBox( "Rows: " & oRevTable.Title)
MsgBox( "Rows: " & oRevTable.RevisionTableRows.Count)
Properties and methods of RevisionTable object are described in Inventor API help. Here is the VBA sample from this help. RevisionTableCell object has property Text that gets and sets the text of the cell.
Public Sub RevisionTableQuery()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the first revision table on the active sheet.
' This assumes that a revision table is on the active sheet.
Dim oRevTable As RevisionTable
Set oRevTable = oDrawDoc.ActiveSheet.RevisionTables.Item(1)
' Iterate through the contents of the revision table.
Dim i As Long
For i = 1 To oRevTable.RevisionTableRows.Count
' Get the current row.
Dim oRow As RevisionTableRow
Set oRow = oRevTable.RevisionTableRows.Item(i)
' Iterate through each column in the row.
Dim j As Long
For j = 1 To oRevTable.RevisionTableColumns.Count
' Get the current cell.
Dim oCell As RevisionTableCell
Set oCell = oRow.Item(j)
' Display the value of the current cell.
Debug.Print "Row: " & i & ", Column: " & oRevTable.RevisionTableColumns.Item(j).Title & " = "; oCell.Text
Next
Next
End Sub
Cheers,
Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network