- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
In the thread feature, is there a way to switch from ANSI Unified Screw Threads to ANSI Metric M Profile using iLogic? When I try using the code below it tells me it is read only.
If ThdType = "Metric" Then
Feature.ThreadType("Thread1") = "ANSI Metric M Profile"
Else
Feature.ThreadType("Thread1") = "ANSI Unified Screw Threads"
End If
I've also tried using...
If ThdType = "Metric" Then
Feature.SetThread("Thread1", Thdx, "ANSI Metric M Profile", "6g")
Else
Feature.SetThread("Thread1", Thdx, "ANSI Unified Screw Threads", "2A")
End If
I get an error saying "The thread designation "ANSI Unified Screw Threads" is not valid".
Master Drafter/ CAD Programmer
Using Inventor 2018
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Mike,
The syntax of this method is
Feature.SetThread("featurename", "thread type", "thread designation", "thread class")
While it looks you specified the third argument as ‘Thread Type’?
In addition, you need to make sure the designation and class are valid with a thread type. e.g. from Thread dialog, you can see the designation and class that are available with a type.
I simply tried with the code below, it works well.
currentType = Feature.ThreadType("Thread1")
MessageBox.Show(currentType, "Title")
Feature.SetThread("Thread1", "GB Metric profile", "M7x0.75", "6H")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Wow. I've looked at that 9 different ways and everytime I missed that fact that I had the order of the arguments wrong.
Thanks!
Master Drafter/ CAD Programmer
Using Inventor 2018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
To All,
How do I specify Left Hand or Right Hand thread using the above code?
Master Drafter/ CAD Programmer
Using Inventor 2018