Can I set lesser and larger limits with an ilogic rule?

Can I set lesser and larger limits with an ilogic rule?

Anonymous
Not applicable
438 Views
2 Replies
Message 1 of 3

Can I set lesser and larger limits with an ilogic rule?

Anonymous
Not applicable

Hi all

 

I'm having a problem with some illogic rules.

On the below screenshot I have a flange that changes hole positions depending on the top width in increments of 50mm.  The 3 central holes need to disappear when the width goes above 500mm and a new rule will take over.

I've tried using the true and false commands to tell it that below 400mm and above 500mm it is false.

This worked on the below 400mm but I only needed to tell it to stop greater than 350mm, but now that I have to give it a lesser than and greater than value the central holes do not go when the width value is entered above 500mm.

 

dfhs.jpg

 

What am I missing?

Thank you for any help.

 

0 Likes
Accepted solutions (1)
439 Views
2 Replies
Replies (2)
Message 2 of 3

philip1009
Advisor
Advisor
Accepted solution

The greater/less than or equal is what is screwing up, if it's equal 400 or 500, it could mean true or false in either statement, so it takes the first statement in the rule that works and then moves on.  You can just simply use < or > without the = to make it work.  Here's your code simplified:

 

If SilencerWidth >= 400 And SilencerWidth <= 500 Then
	Feature.IsActive("Width_400_500") = True
Else
	Feature.IsActive("Width_400_500") = False
End If

 

P.S. iLogic, VBA, and Add-In questions are meant to be posted under the Inventor Customization Forum, there you'll find plenty of expert users to help you automate your designs.

Message 3 of 3

Anonymous
Not applicable

Thank you Philip1009, that works a treat.

Much appreciated.

 

 

0 Likes