Message 1 of 2
Change tapped hole with iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to change a tapped hole M3x0.5 to a M4x0.7 but I always get errors that I can not solve.
This is my code:
Dim part As PartDocument = ThisApplication.ActiveDocument
Dim hole As HoleFeature = part.ComponentDefinition.Features.HoleFeatures("Bohrung2")
Dim newThreadDesignation As String = "M4x0.7"
Dim newThreadClass As String = "6H"
Dim spreadSheetFilePath As String = "C:\Users\Public\Documents\Autodesk\Inventor 2023\Design Data\XLS\de-DE\thread.xls"
Dim spreadSheetSheetName As String = "ISO Metric profile"
Feature.SetThread(hole.Name, spreadSheetSheetName, newThreadDesignation, newThreadClass)
The error says: "The thread designation ‘M4x0.7’ is not valid." But in the thread.xls it clearly is.
If I enter "M3" as newThreadDesignation it works and the code changes the hole although it is not listed in the xls...
If I enter "M4", it throws the error "Incorrect parameter. (Exception of HRESULT: 0x80070057 (E_INVALIDARG))"
Thanks in advance for any hints.