iLogic Tutorial From Autodesk – 10

Updating the iLogic iProperties

Let’s add one more rule. This rule will update some of the iProperties of the manifold block part. Add a new rule named “part_number_rule”. This rule will set the Inventor Part Number iProperty value.

For standard components, we can look up the Part Number in the embedded spreadsheet. Then, we use the value in the “model_code” cell to set the Part Number property for the part. To make it easy to do this, iLogic provides the iProperties.Value function, in the iProperties category on the Rule Syntax tab.

As with earlier rules, we first need to locate the row in the embedded spreadsheet to read values from. We locate the row using port_a_size.

If component_type = “standard” Then
i = GoExcel.FindRow(“3rd Party:Embedding 1”, “Sheet1”, “port_size”, “=”, port_a_size) iProperties.Value(“Project”, “Part Number”) = GoExcel.CurrentRowValue(“model_code”)

For custom components, we just used a fixed string for the part number, so we don’t need to use any information from the spreadsheet.

iProperties.Value(“Project”, “Part Number”) = “HomeMade”
End If

Click OK on the Rule Editor to close this rule.

Test the Rule (Part_Number_Rule)

To verify that the new rule is working, click on File from the Inventor pull down menu. Click on iProperties. The iProperties dialog box will appear. Click on the Project tab. Text is entered next to the Part Number.

Check Inventor iProperties

Click Close to close this dialog box.

Go to the iLogic Parameter Editor and change component from standard to custom. Click OK and reopen the Inventor iProperty dialog box. You will notice that the Part Number has updated to be “HomeMade”.

Checking iProperties

Complete iLogic Code for  iLogic_Intro_Tutorial_02


iLogic Introduction Tutorial Links




iLogic Intro Two

Subscribe to Blog via Email