Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor Thread Size iLogic

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
809 Views, 3 Replies

Inventor Thread Size iLogic

I'm looking to make custom bolts, with threads of different sizes (bolt diameter), and I've seen at least one other forum post and it seemed the easy answer was to make multiple different iParts, one for each different bolt diameter.  I'm pretty new to iLogic, but it seems to me that it is capable of handling this in one iPart.

 

I've put in this If-Then rule, and it runs without issue at first, but when switching to the different diameter of bolt it still gives the error code that "Problems occurred while building this Thread: Inappropriate Thread Size". 

 

Can anyone shed any light on this?  If it's not possible, I suppose we can just have different iParts for each bolt diameter.  Thanks in advance.


If dia = 0.5 in Then
Feature.ThreadDesignation("Thread1") = "1/2-13 UNC"

Else If dia = 0.625 in Then
Feature.ThreadDesignation("Thread1") = "5/8-11 UNC"

Else If dia = 0.75 in Then
Feature.ThreadDesignation("Thread1") = "3/4-10 UNC"

Else If dia = 0.875 in Then
Feature.ThreadDesignation("Thread1") = "7/8-9 UNC"

Else If dia = 1 in Then
Feature.ThreadDesignation("Thread1") = "1-8 UNC"


End If

3 REPLIES 3
Message 2 of 4
Sergio.D.Suárez
in reply to: Anonymous

Hi, Your rule has not given me problems.
Only I have to tell you some things, I have added some lines to activate or deactivate the thread, if it is not in the defined ranges. Because otherwise I would give error.

Feature.IsActive("Thread1")= True
If dia = 0.5 in     Then
Feature.ThreadDesignation("Thread1") = "1/2-13 UNC"

Else If dia = 0.625 in  Then
	MessageBox.Show("Message", "Title")

Feature.ThreadDesignation("Thread1") = "5/8-11 UNC"

Else If dia = 0.75 in Then
Feature.ThreadDesignation("Thread1") = "3/4-10 UNC"

Else If dia = 0.875 in Then
Feature.ThreadDesignation("Thread1") = "7/8-9 UNC"

Else If dia = 1 in Then
Feature.ThreadDesignation("Thread1") = "1-8 UNC"
Else
	Feature.IsActive("Thread1")= False

End If


On the other hand, understand the difference with ipart and make an ilogic component, if you need many instances of the different measures component, with ilogic you cannot do it with the same part. You will need to copy the file with a new name and configure this new file for your need. If you face this case, a ipart would be a better solution.
I hope I have been clear, and this can help with your problem. regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 3 of 4
Anonymous
in reply to: Sergio.D.Suárez

I am still getting an error code when changing from one diameter of bolt to another that there was an error building the thread. 

 

Is there a way that I can make the rule run automatically when I change bolt diameters?

 

I have tried using iTriggers to run the rule after parameters have changed, but it's still spitting out the error code.

 

Thanks,

Message 4 of 4
Anonymous
in reply to: Anonymous

Here is my part...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report