Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iPart with iLogic rule not working in assembly

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
447 Views, 4 Replies

iPart with iLogic rule not working in assembly

Hello,

yesterday I was bored so I tried iLogic rules which is something totally new to me . I don't understand what I am doing but with my random clicking and typing I somehow managed to make my ipart follow iLogic rule so when I change number of rows or columns it changes bottom of my part. The Lego part has 3 stages dependant on number of rows and colums (1x1, 1xX, XxY) but when I open this part in the assembly it doesn't follow my iLogic rule and I have absolutelly no idea what to even look for to make it work. Can someone give me an advice and if possible very easy to understand?

 

I have also second question. Is there a way to have an appearance property in my ipart table? I have tried to make color column through other tab but I have to write color in there. I would like to have a choice menu.

 

Thank you in advance for your help.

4 REPLIES 4
Message 2 of 5
A.Acheson
in reply to: Anonymous

Can you post the ilogic rule your using and images of the part /iPart Tablecolumns. This will give a sense of what your looking to achieve. I am using Inv 2020 so cannot open the file. Where have you placed the rule internally in the part file/assembly file  or as an external rule. What version of Inventor are you using?

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 5
Anonymous
in reply to: Anonymous

I made this part in 2022 version. This it my iLogic rule I used for that part and I guess it is internal rule. It changes bottom of my part as shown on picture (enabling/disabling extrudes). It litteraly say if it has 1 row or 1 column to use first extrude and if it has more than 1 row and column to use second extrude.

 

When I open this part in assembly I want to choose rows, columns and height (flat, base). This all work except changing bottom of my part as shown on the third picture.

 

If d9 = 1 And d22 > 1 Then
Feature.IsActive("Výčnělek1R") = True
End If

If d9 > 1 Or d22 = 1 Then
Feature.IsActive("Výčnělek1R") = False
End If

If d22 = 1 And d9 > 1 Then
Feature.IsActive("Výčnělek1C") = True
End If

If d22 > 1 Or d9 = 1 Then
Feature.IsActive("Výčnělek1C") = False
End If

If d9 >= 2 And d22 >= 2 Then
Feature.IsActive("VýčnělekXR") = True
End If 

If d9 < 2 Or d22 < 2 Then
Feature.IsActive("VýčnělekXR") = False
End If

 

Message 4 of 5
Anonymous
in reply to: A.Acheson

Also just to clarify in the rule paragraph 1 and 2 are mirrored to paragraph 3 and 4. It just swaps if there is 1 row or 1 column.

Message 5 of 5
A.Acheson
in reply to: Anonymous

The way iParts work is that the family of member should be fully defined in the factory file. You can manually define each members through the table or use ilogic to turn off and on the features if required.  Then when you generate the member (derive the file ) you then switch out the members in the assembly file. There is a possibility for custom parameters which you can define on part placement. You can automate this switching of members in the assembly with ilogic using the snippet 

iPart.ChangeRow("iComponentName:1", "RowMemberName")

 Any further querying of parameters etc may need to be done using the API to access the family table check parameter values and pick an appropriate member)

 

Perhaps what your looking to achieve would be best handled with iLogic part file or with a fully defined iPart. Maybe other user with access to Inv 2022 might be able to offer other suggestions. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report