Hole Table iLogic

Hole Table iLogic

Anonymous
Not applicable
1,665 Views
4 Replies
Message 1 of 5

Hole Table iLogic

Anonymous
Not applicable

I posted on the main forum, but it hasn't gotten any traffic. Hopefully someone here can help me out.

 

https://forums.autodesk.com/t5/inventor-forum/ilogic-hole-table-replace-character/m-p/7131747#M64635...

 

Thank you!

0 Likes
Accepted solutions (1)
1,666 Views
4 Replies
Replies (4)
Message 2 of 5

MechMachineMan
Advisor
Advisor

Is your hole table the standard hole table from Inventor?

 

Custom solutions demand details....


--------------------------------------
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 5

Anonymous
Not applicable

Yes. Thanks!

hole table options.JPG

0 Likes
Message 4 of 5

MechMachineMan
Advisor
Advisor
Accepted solution

SyntaxEditor Code Snippet

Sub Main()
    Dim oHoleTable As HoleTable = ThisDoc.Document.ActiveSheet.HoleTables(1)
    
    For Each oRow In oHoleTable.HoleTableRows
        oRow.HoleTag.Text = oRow.HoleTag.Text.Replace("T", "R")
    Next
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
Message 5 of 5

Anonymous
Not applicable

Thanks a bunch @MechMachineMan!

 

I think you probably just saved me a weeks worth of monotony.

 

FYI for anyone else that comes along in the future: the bigger your hole table, the longer this will take. The code checks every line in the table, if it's not a T_ hole it moves on to the next hole. If it is a T_ it replaces the T with an R. My 400 hole hole table took about 5 minutes for the program to run.

 

0 Likes