Change Revision Table Properties

Change Revision Table Properties

Anonymous
Not applicable
809 Views
3 Replies
Message 1 of 4

Change Revision Table Properties

Anonymous
Not applicable

I am coding a macro to insert a company standard revision table.  I can properly insert the table where I want to but cannot find a way to changed its properties.  The default indexing option is numeric and I want to change it to alpha.  Any ideas on how this can be done via VBA?

 

Thanks!

0 Likes
810 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I'm really need a solution to this. 

Any way to use this: oRevTable.RevisionTableColumns.Item(1).Type =

I've printed out what it currently is and its just a number: "117467136"

Does this number (in some way) indicate to inventor what indexing style to use?

Does Autodesk have anything to say on the issue?  I have been searching the web, the forums, and the API documentation for the last week and have found many people who want to address similiar issues with rev tables but have been unable to find solutions.

0 Likes
Message 3 of 4

Mike.Wohletz
Collaborator
Collaborator

I have not done much with the revision table, but I had seen your post and thought I would look at this one. It is a lot like the Parts list from what I can see. I have not gone as far as to how the alpha and numeric values are set but I do have a routine that I made up real quick that will change it to the correct alpha value. This is done in .NET (sorry I dont have the time for VBA) but I think that you will get the picture of what it is doing.

 

Public Sub RevisionTableAlpha()

        Dim oDrawDoc As DrawingDocument = G_oApp.ActiveDocument

        Dim oRevTable As RevisionTable = oDrawDoc.ActiveSheet.RevisionTables.Item(1)

        ' Iterate through the contents of the revision table.
        For i As Long = 1 To oRevTable.RevisionTableRows.Count
            ' Get the current row.
            Dim oRow As RevisionTableRow = oRevTable.RevisionTableRows.Item(i)

            ' Iterate through each column in the row.
            For j As Long = 1 To oRevTable.RevisionTableColumns.Count
                ' Get the current cell.
                Dim oCell As RevisionTableCell = oRow.Item(j)
                If oRevTable.RevisionTableColumns.Item(j).Title = "REV" Then
                    Try
                        Dim val As Long = CType(oCell.Text, Long)
                        If val >= 0 Or val <= 20 Then
                            ' starting with 65 we will set 0 to A etc.
                            oCell.Text = Chr(65 + val)
                        End If
                    Catch ex As Exception

                    End Try
                End If
            Next
        Next
    End Sub

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Thanks for the input!  Sadly I can't and need access to the property itself so the revision iProperty would update using letters instead of numbers. Hopefully someone else can find this information useful as I have seen many people looking for this information in my search.

 

Update: We have actually decided to use revision blocks on all our drawings now and simply include the revision table in our template (and therefore have it inserted with the "alpha" property selected).  We have revision A set as the initial drawing release as our new ERP system is going to require this anyway.

0 Likes