I'm new to i-logic and VBA.
I have a lot of drawings that I need to delete inactive rows of a revision table and update all cells with the same information.
I was thinking it may be best to delete the table and then add it back into the drawing at a specific location relative to the sheet size of the drawing.
Is that the best way or would it be easier to delete inactive rows of the revision table, then add the required information into the cells.
I would like the cell information to remain in the form for the next drawing I open, so it can be repeated easily. Would this need to come from a spreadsheet? How can I achieve this?
Can anyone help please?
Hi,
The current API provides the property to check if the row is active and the method to delete it. e.g. the VBA code below iterates all revision table of the active sheet and deletes the inactive rows.
hope this helps.
Sub deleteinActiveRow() Dim oDrawingDoc As DrawingDocument Set oDrawingDoc = ThisApplication.ActiveDocument Dim oActiveSheet As Sheet Set oActiveSheet = oDrawingDoc.ActiveSheet Dim oEachRevisionTable As RevisionTable Dim oEachRow As RevisionTableRow For Each oEachRevisionTable In oActiveSheet.RevisionTables For Each oEachRow In oEachRevisionTable.RevisionTableRows If oEachRow.IsActiveRow = False Then 'if it is inactive row, delete it oEachRow.Delete Next Next Next End Sub
sorry, a typo:
If oEachRow.IsActiveRow = False Then
'if it is inactive row, delete it
oEachRow.Delete
End If