Hide revision rows

Hide revision rows

Anonymous
Not applicable
1,192 Views
6 Replies
Message 1 of 7

Hide revision rows

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
1,193 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Does right clicking and selecting Visibility do what you are looking for?

0 Likes
Message 3 of 7

Anonymous
Not applicable

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.

0 Likes
Message 4 of 7

MjDeck
Autodesk
Autodesk

Are you running Inventor 2012?  You can do it in 2012, but not in previous revisions.

 


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 7

Anonymous
Not applicable
Yes, I'm running Inventor 2012 🙂
0 Likes
Message 6 of 7

MjDeck
Autodesk
Autodesk
Accepted solution

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

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 7 of 7

Anonymous
Not applicable
Brilliant, thanks a lot for your help!
0 Likes