Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hide revision rows

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
stian-j
915 Views, 6 Replies

Hide revision rows

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.

6 REPLIES 6
Message 2 of 7
Mooref3
in reply to: stian-j

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

Message 3 of 7
stian-j
in reply to: stian-j

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.

Message 4 of 7
MjDeck
in reply to: stian-j

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

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 5 of 7
stian-j
in reply to: stian-j

Yes, I'm running Inventor 2012 🙂
Message 6 of 7
MjDeck
in reply to: stian-j

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
stian-j
in reply to: stian-j

Brilliant, thanks a lot for your help!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report