Inventor 2013, iLogic, length based part suppression /component parameter change

Inventor 2013, iLogic, length based part suppression /component parameter change

Anonymous
Not applicable
386 Views
2 Replies
Message 1 of 3

Inventor 2013, iLogic, length based part suppression /component parameter change

Anonymous
Not applicable

Let me start by saying I just started using ilogic the other day. My company makes transtation crane systems and wants to create automated assemblies. I am the only inventor user here and have been assigned this task. I have started with trying to create a bridge that will adjust lengths and support types based on my entry form. I've created an entry form where you can enter any combination of feet & inches between 5 feet and 34 feet.

 

For lengths 8ft and under, I need to supress the support tube & struts. For lengths between 8'-1" and 20'-0", I need the struts suppressed, the tube attached directly to the track, and the tube to 22" shorter than the track on each side.For lengths 20'-1" to 28'-0", I need the struts turned on, the tube offset by 5" (which drives the length of the struts), & the tube still 22" shorter than the track on each side. For 28'1" and up, it's the same as the previous excepts the tube now needs to be 22.5" shorter than the track on each side.

 

The struts are working and supressing perfectly using "if" statements. The tube offset is also working great.

 

My problems are changing the tube length equation automatically over a certain length and suppressing the tube for lengths 8'-0" and under.

Also, even though I've selected every possible trigger and created update rules, I still have to hit save before the strut pattern updates when I enter a new length into my form.

 

I've being trying using if statements for the tube supression and length eqaution changes but I keep getting errors. I know I'm probably entering it wrong, could someone please help?

 

What I've been trying is variations of the below:

 

If Parameter("LENGTH") <= 96 Then Component.IsActive("TUBE:1") = False
If Parameter("LENGTH") >96 And <= 336 Then Parameter("TUBE:1", "LENGTH") = LENGTH-44
If Parameter("LENGTH") > 336 Then Parameter("TUBE:1", "LENGTH") = LENGTH-45
End If

Here's some pics of different lengths:
Capture1.JPG
Capture2.JPG
Capture3.JPG
0 Likes
387 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

An awesome person on a different message board posted the below solution and it worked:

IF LENGTH <= 96 Then
Component.IsActive("TUBE:1") = False
Else IF LENGTH > 336 Then
Component.IsActive("TUBE:1") = True
Parameter("TUBE:1","LENGTH") = LENGTH - 45
Else
Component.IsActive("TUBE:1") = True
Parameter("TUBE:1","LENGTH") = LENGTH - 44
End IF
ilogicvb.updatewhendone = true

-Will Mann

Inventor Professional 2015 : SP1 U1
Vault Professional 2015
AutoCAD Mechanical 2015

 

 


Even with the update code and triggers turned on though, I still have to hit save to get the strut pattern to update. Is there any solution to that?

0 Likes
Message 3 of 3

Anonymous
Not applicable

When I change it to the lower lengths I'm also getting a red cross that says my pattern failed (even though it's supressed - when I right click the pattern the check mark is next to supressed, even though there isnt a line going thru it and it's not grayed out).

 

Is there a way to fix this?

 

Capture4.JPG

0 Likes