iLogic Tutorial From Autodesk – 08

Creating an iLogic Rule – Continued

Rules are written in the bottom panel of the iLogic Rule Editor window. Rule keywords can be entered by typing them directly, or clicking the buttons representing common keywords at the bottom of the dialog box.

Adding iLogic code via buttons

iLogic MultiValue ParameterThere are two holes on the bracket model: a hole in the base, and a hole on the flange. We will write a rule that will turn on (or off) the base hole, the flange hole, or both. Earlier we created a multi-value parameter called holes. The three values we assigned to this parameter were base, flange and none. The rule we will write will turn on the flange hole when the flange value is chosen. Choosing base will turn on the base hole and choosing none will turn off both holes.

Now let’s start creating the rule. We’ll first handle the “flange” setting of the holes parameter.

In the rule text window, type If (or click the “If” keyword button below the rule text area), and then enter a space. Notice that the text of the “If” keyword turns bold and red. The red color indicates a recognized language element (in this case a keyword). In the model tree, click the iLogic Parameters node to reveal the list of iLogic parameters. Double click on holes and the holes parameter name will be inserted into the editor. Type “ = ” and then in quotation marks type flange. Finish this statement by typing then (or click the “Then” button). Notice the different colors applied automatically to the different language elements of the expression defined so far. This color coding makes rules much easier to read, and will help you quickly comprehend their meaning, and identify any mis-entered information.

Press Enter to move to the next line.

Color coded iLogic code

iLogic Tutorial Navigation

1234567891011121314151617181920

 

iLogic Intro One

Subscribe to Blog via Email

Top