Revision table column width

Revision table column width

Anonymous
Not applicable
266 Views
1 Reply
Message 1 of 2

Revision table column width

Anonymous
Not applicable

Hi everyone,

 

I've a problem setting the width of a column in a revision table inserted in a drawing via VBA.

 

Below my code

 

Sub RevisionTable()
    
    Dim oDrawDoc As DrawingDocument
   
    Dim oRTBs As RevisionTables
    Dim oLocation As Point2d
    Dim oRTB As RevisionTable
    Dim oRTC As RevisionTableColumn
        
    Set oDrawDoc = ThisApplication.ActiveDocument
    Set oRTBs = oDrawDoc.ActiveSheet.RevisionTables
    Set oLocation = ThisApplication.TransientGeometry.CreatePoint2d(30.253, 6.035)
        
    
    Set oRTB = oRTBs.Add(oLocation)
    
    oRTB.ShowTitle = False
    oRTB.TableDirection = kBottomUpDirection
    
    oRTB.RevisionTableColumns.Item(1).Delete
    oRTB.RevisionTableColumns.Item(3).Reposition (2)
    oRTB.RevisionTableColumns.Add (kRevisionTableSheetProperty)
    oRTB.RevisionTableColumns.Item(5).Title = "PROGETTISTA"
    oRTB.RevisionTableColumns.Item(5).Reposition (4)
    oRTB.RevisionTableColumns.Item(3).Reposition (2)
        
    For Each oRTC In oRTB.RevisionTableColumns
    
      oWidth = "1.2"
      oRTC.Width = oWidth
      
    Next
          
       
End Sub

 

 

 

Error reported "Method 'Width' of object 'RevisonTableColumn' failed

 

Can someone help me?

 

Thanks.

0 Likes
267 Views
1 Reply
Reply (1)
Message 2 of 2

kennyj
Collaborator
Collaborator
Welcome to the forums!

You might have better results by posting this question in the Inventor Customization forum; where there are a lot of iLogic/VBA/.net wizards lurking.

Good luck!
0 Likes