inventor-ipart-members-ilogic-code-1.PNG

As I have been getting into iLogic lately, I’ve been thinking how I could use it to pull some information into custom family tables. That’s how I came across this VBA Macro.

I’ve created an iPart that I intend to Publish to my custom library, and I want to have the weight of each member shown in the Family Table. As the mass cannot be added to the family table directly, iLogic sounds like the perfect tool to use in order to achieve that.

First, a custom iProperty (Weight) is created for the iPart:

inventor-ipart-members-ilogic-code-2.PNG

Then, the custom iProperty can be added to the family table:

inventor-ipart-members-ilogic-code-3.PNG

In order to get the correct weight value for each row, the following iLogic Rule was created:

inventor-ipart-members-ilogic-code-4.PNG

Note: the item in this line oRow.Item(5).Value = strWeight is 5 because “Weight” is the 5th column in my family table. 

If we then run the rule, the Weight values will be extracted from the Mass Properties and written in the table for each row.

iLogicWeight.gif

.txt with code attached below: