Is there any way to hide revision rows when reaching a specific number of rows? I only want to show the 5 latest rows in a drawing, so it would be great if the first rows could be disabled when adding a new row. I know it's possible to split a table when reaching a number of rows, but I would like to hide them instead.
Solved! Go to Solution.
I was hoping to achieve this by maybe by an ilogic rule or a macro, so it happens automatically when adding the sixth revision row. But i don't know if it's possible.
Here's an iLogic rule to do it. This will work on all revision tables in the drawing.
The rule won't run automatically when you add a row to the table. However, you can at least make it run when the drawing is saved. Use the Event Triggers command (on the Manage -> iLogic tab in the ribbon). Attach the rule to the Before Save Document event.
Dim visibleRowsWanted As Integer = 5 For Each sheet As Sheet In ThisDrawing.Document.Sheets For Each revTable As RevisionTable In sheet.RevisionTables Trace.WriteLine(" --- " & revTable.Title) Dim rows as RevisionTableRows = revTable.RevisionTableRows Dim numberToHide As Integer = rows.Count - visibleRowsWanted If (numberToHide <= 0) Then Continue For For i = 1 To numberToHide rows(i).Visible = False Next Next Next