Revision Table Style

Revision Table Style

Anonymous
Not applicable
823 Views
2 Replies
Message 1 of 3

Revision Table Style

Anonymous
Not applicable

I am trying to update Revision tables with this code. After it runs if I click on the revision table it shows it is now "Revision Table" style, but if I change it to By Standard which is using "Revision Table" it changes and is now really using the style.  It also exhibits a very strange behavior  if I switch it back and forth between By Standard and Revision Table it moves up the sheet.

 

What am I missing?   Also ideally I would like it to end up as By Standard, but I haven't been able to figure out how to do that. 

 

Thanks for any assistance.

 

 

 

    Dim oDocStyles As Inventor.DrawingStylesManager
    Set oDocStyles = oDoc.StylesManager
    Dim oRevStyle As RevisionTableStyle
    Set oRevStyle = oDocStyles.RevisionTableStyles.Item("Revision Table")
    Dim oRevisionTable As RevisionTable
    Set oRevisionTable = oDoc.Sheets(1).RevisionTables(1)
    
    oRevisionTable.Style = oRevStyle
    
    
    oDoc.Update
0 Likes
824 Views
2 Replies
Replies (2)
Message 2 of 3

MechMachineMan
Advisor
Advisor

Could it be that the existing one has style overrides applied to it that ARE NOT wiped when you change the style using VBA, but ARE wiped when you change it through the UI?


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks for the Reply Justin,

 

It must be something along those lines.  I forgot to mention that just before that code, I am updating the styles from the global Styles.  The style applied to the Revision table is the same name before and after the update, so I guess my setting it to that name does nothing.

 

As a workaround, I am setting it to a different style after the global update, and then back to the original style. 

 

I would still like to know how to make it so that  when you click on it it shows "By Standard"

0 Likes