VBA adding column to revision table

VBA adding column to revision table

Anonymous
Not applicable
997 Views
2 Replies
Message 1 of 3

VBA adding column to revision table

Anonymous
Not applicable

I've written some code which resizes/updates the active sheet's borders, title blocks, styles etc.

I'm having trouble with the revision table when resizing the sheet, our templates miss out a "GRID REF" column in A4 which is custom but already exists. When scaling down to A4 I can delete this column but cannot add it

 

    Set RevTable = invDoc.ActiveSheet.RevisionTables(1)
    If "A4" = SheetSize Then
 
        If RevTable.RevisionTableColumns.Count = 4 Then
        Else
            RevTable.RevisionTableColumns.Item(3).Delete
        End If
           
    Else
       
        If RevTable.RevisionTableColumns.Count = 4 Then
            RevTable.RevisionTableColumns.Add (kRevisionTableCustomProperty,,"GRID REF",3)
 
        End If
       
    End If
 
The add line does not work, it says it should equal an expression but what and why?
 
 
Another thing that I would like to do is resize the column widths if possible but this is less important.
 
Thank you in advance!
0 Likes
Accepted solutions (1)
998 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

I have since made it work- but am still left with the problem of the width not being right!

 

Also, I am taking the new borders etc. from the default template which also has illogic rules in- how can I bring these into the new drawing? Is this even possible?

0 Likes
Message 3 of 3

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@Anonymous wrote:

I have since made it work- but am still left with the problem of the width not being right!

 

Also, I am taking the new borders etc. from the default template which also has illogic rules in- how can I bring these into the new drawing? Is this even possible?



Hi aliceloneragan,

 

There is an example of setting the column width at this link:

http://forums.autodesk.com/t5/inventor-customization/revision-table-collumn-width-change/m-p/6407387#M65030

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes