iLogic - How to set a parameter?

iLogic - How to set a parameter?

francesco.dinh
Advocate Advocate
474 Views
1 Reply
Message 1 of 2

iLogic - How to set a parameter?

francesco.dinh
Advocate
Advocate

Sorry for the naive question.

I'm trying to make a semi-customizable forklift for my models. Attached you can find the file (modified from this one: https://forums.autodesk.com/t5/inventor-forum/looking-for-assembly-model-for-a-forklift-truck/td-p/3...)

If you open it, there'll be a simple module enabling the user to work with the fork height and width.

image.png

You could write the dimensions you want in the fields but that's kinda fiddly. To work on the height, the most used variable, I've created a simple rule, "Alza", that allows the user to increase the height of the forks by DeltaH = 100mm. It's literally one line:

 

ForkHeight = ForkHeight + DeltaH

 

The fact is that the iLogic rule is not working. Everytime I try to run it, it simply doesn't do anything (nor it gives out an error message)

Is there something I'm missing?

Thanks in advance.

0 Likes
Accepted solutions (1)
475 Views
1 Reply
Reply (1)
Message 2 of 2

francesco.dinh
Advocate
Advocate
Accepted solution

I've found a solution that might be helpful to anyone reading in the future.

My error was that I had two rules acting on the variable ForkHeight: "Alza", that increased the parameter by 100mm, and "Abbassa", that decreased it by 100mm. They were both being activated when running a rule: everytime a rule calls a parameter, every rule containing that parameter is called, so what was happening was that the two rules were called together and as a result no apparent change was being detected.

To solve this, all I had to do was to select the "Don't Run Automatically" check in the rule options.

Moreover, once fixed this the documents still wasn't changing the height. This was due to the fact that I had to refresh the document each time. For this, all I had to do was to add a

iLogicVb.UpdateWhenDone = True

 to the document and it worked. Score!