Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There is some issue with the functionality of the active row and the only workaround I am aware of isn't ideal.
In a revision table, if you use "insert row", it does not make it the active row. The only current way I am aware of to change the active row is to use the "add row" feature, copy the data into that row, and the old row.
In order to prevent this workaround of copy/pasting I tried writing a simple iLogic rule to allow the user to switch it via API.
Although the API says ".IsActiveRow" is a read-write property, the below code errors out when I try to set it. Thinking it may be because it cannot have 2 active rows, I tried disabling it first, but even that did not work.
Sub Main() 'kDrawingRevisionTableFilter 16904 Drawing revision table filter. oRevTable = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingRevisionTableFilter, "Select Rev Table") Dim oRow As RevisionTableRow For Each oRow In oRevTable.RevisionTableRows If oRow.IsActiveRow = True Then oActiveRow = oRow(1).Text End If Next Dim oNewActiveRow As String oNewActiveRow = InputBox("Select New Active Row", "MacroMagic", oActiveRow) For Each oRow In oRevTable.RevisionTableRows If oRow(1).Text = oActiveRow Then oRow.IsActiveRow = False End If Next MsgBox("Active row removed!") For Each oRow In oRevTable.RevisionTableRows MsgBox(oRow(1).Text & vbLf & oNewActiveRow) If oRow(1).Text = oNewActiveRow Then oRow.IsActiveRow = True End If Next
MsgBox("Active row set!" & vblf & vblf & "Please open rev table dialog and double check")
End Sub
--------------------------------------
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
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
Solved! Go to Solution.