- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was attempting to write a simple iLogic form to handle a few pipe sizes with NPT threads. I created a Thread Feature ("Thread1") on my pipe, turned off "Full Length" and set Specification Thread Type = NPT and Size = 1.
Under Parameters I have OD and ID for the model and a User Defined multi-value parameter called SIZE with values 1, 1.5, and 2 and added this parameter to my iLogic form. Then I created a Rule with this code:
Select Case SIZE Case 1 OD = 1.315 ID = 1.049 Case 1.5 OD = 1.900 ID = 1.610 Case 2 OD = 2.375 ID = 2.067 End Select Feature.ThreadDesignation("Thread1") = FormatAsFraction(SIZE)
The form works as expected and it sets the correct NPT Thread Size, but oddly it does not update the length. Thread lengths should be for Size 1 = 0.985 in, Size 1 1/2 = 1.025 in, Size 2 = 1.058 in. These values appear in the Length field when you change the Size under Edit Feature for Thread, even though it's greyed out when Thread Type is set to NPT.
Using the iLogic form to select Size and have the rule change the thread should update its thread length, but it remains the same unless you go Edit Feature for Thread and change the size there. Only then you can notice the visual change to the model. But how can I trigger this change using iLogic code? I noticed Inventor creates a dimension parameter for the thread length which gets updated when clicking Apply under the Edit Feature for Thread. I guess I could name this parameter TL and set the thread length manually in my code, but I shouldn't have to. Any one have any ideas why this doesn't update accordingly or how to force the change to occur in iLogic?
Solved! Go to Solution.