iLogic Tutorial – Writing the iLogic Hinge Count Rule
You should now have something like that shown in the image below…
Now run a full test on the rule. Open the iLogic Parameter Editor via the iLogic Parameters icon on the iLogic Parameters . With the full part visible, change the Handed parameter value from Left to Right. The program will need to change a good deal of geometry, but fairly rapidly all of the holes should switch sides. If so, try the None value. If they all went away, the code is working fine. If not, click on the Edit iLogic Tree icon on the iLogic panel to bring up the list for this part. The iLogic Tree Editor will pop up as shown to the right. Double click on the rule to go back and edit it. You can look at, or even copy and paste the code from this text file. — Left_Right_Code.txt
The next rule will tell the part how many hinges in what configuration depending on the height of the door. As stated earlier, the configuration is based on real-world rules used by a large door manufacturer, and are similar to the ones I have used while building cabinets myself.
Start the new rule by clicking on the Add Rule icon on the iLogic Panel . Name the rule Hinge_Count. You will create the first line of code the same way you created the first line of the last rule. The If statement cones from the button at the bottom of the code editor window, the Opening_Height is located by clicking on the User Parameters in the window under the Model tab, and then double clicking the parameter in the Parameter window to the right. After adding a space, you need to enter a Less Than symbol (Handed parameter from the parameter list (after clicking iLogic Parameters in the Model window), etc., etc. All of this can be typed in, copy & pasted in, or selected with double clicking and/or buttons. If you do type the code, remember that it is case sensitive and typos will cause it to not work.
This line tells the program that if the height of the door is less that 6.9375″ and the Handed parameter is set to the Right variable, then do something. The something is as follows…
..so put together, the code states that no hole are present when the Opening_Height parameter is set below the stated value.
The next line states what to do if the opening size is between two dimensions…
– iLogic Tutorial Navigation –
Intro – 1 – 2 – 3 – 4 – 5 – 6 – 7 – 8 – 9 – 10 – 11 – 12 – 13 – 14 – 15 – 16 – 17 – 18 – 19