Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic help

4 REPLIES 4
Reply
Message 1 of 5
daulj
287 Views, 4 Replies

iLogic help

So I'm having an issue with suppressing components when the conditions vary. I have some wedges and the the configuration and quantity varys based on the parameter selected. I can have one wedge per pocket, two wedges per pocket, and so on. The pockets also vary. There may be 2, 3, 4, or 5 pockets with either 1, 2, or 4 wedges each. I'm not sure the best way to suppress them when the conditions change. I currently have enough wedges for each variaton, but when parameters change some seem to stay active. Any suggestions. I may not have this set up the best way, or I may just need a bunch more rules, but I'll take any suggestions! Files are attached.

4 REPLIES 4
Message 2 of 5
swordmaster
in reply to: daulj

What version of inventor are you using?

Inventor 2010 Certified Professional
Message 3 of 5
daulj
in reply to: swordmaster

I'm using Inventor 2013, but I actually found a way to get it to work properly. It was a pain in the ****, though. I had to call out every wedge and every scenario. There has to be a better way then the way I figured out. Below is a sample of the 2900 lines of code I wrote: If stake_pocket_configuration = "two_stakes_two_wedges" And number_of_stake_pockets = "5" Then Component.IsActive("wedge2-2_a1") = True Constraint.IsActive("Mate:23") = True Constraint.IsActive("Mate:24") = True Constraint.IsActive("Mate:25") = True Component.IsActive("wedge2-2_a2") = True Constraint.IsActive("Mate:26") = True Constraint.IsActive("Mate:27") = True Constraint.IsActive("Mate:28") = True Component.IsActive("wedge2-2_a3") = True Constraint.IsActive("Mate:29") = True Constraint.IsActive("Mate:30") = True Constraint.IsActive("Mate:31") = True This goes on for "two stakes two wedges" And 4 pockets, then 3 pockets, then 2 etc. Then there's also two stakes and one wedge with all the same combinations...it took FOREVER! Any recommendations would be appreciated! -Justin
Message 4 of 5
pcrawley
in reply to: daulj

I think there may be a much neater solution - but you'll need to post all the files for someone to have a look.  The 3 files you have attached don't make up the whole assembly.

 

From the little I can see, you would be better off creating an assembly pattern of stakes and wedges, then controlling the number in the pattern through your iLogic rules.  

 

I could be wrong - I just can't see the whole model.

Peter
Message 5 of 5
MegaJerk
in reply to: pcrawley

^^^ Agreed.

Post files, and despite that I can not use them (2012), if you also post pictures (and even code!) I'm sure we can all figure out a better way to do it than massive sheets of ilogic.



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub

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

Post to forums  

Autodesk Design & Make Report