Ilogic Noob trying to Wright a rule...... dont LOL to hard

Ilogic Noob trying to Wright a rule...... dont LOL to hard

Anonymous
Not applicable
401 Views
3 Replies
Message 1 of 4

Ilogic Noob trying to Wright a rule...... dont LOL to hard

Anonymous
Not applicable

Hello 

so i am new to rule and ilogic

where do i start?  

ok. i have a basic code that can change a length of 2 part base on what i type in "110 makes the parts 110in long"

so now what i am trying to do is add a "New Part" "i know how to do that" BUT if the "New Part" can go from 0-140in if it is over 140in the i need to add the same "New Part" to fill the space

 

e.g 

the model i am building totals 200in in length i need 1 "New Part" to be at 140in and 1 "New Part" to be 60in.

but if the total length is under 140in then i just need 1 "New Part" at the length i type in.

if possible i would like to have this to all work automatically based on the Total length of the model 

Thanks     

0 Likes
402 Views
3 Replies
Replies (3)
Message 2 of 4

Justin.B.
Enthusiast
Enthusiast

Build both solids, then disable the second one if your dimensions fall under that range.

If partLength <= 140 Then
	Feature.IsActive("Extrusion2") = False	'Second solid not needed, disable it
	part1Size = partLength			'Part 1 is the only dimension needed
Else
	Feature.IsActive("Extrusion2") = True	'Activate second solid if length is over 140
	part1Size = 140				'Limit the first part to its max length
	part2Size = partLength - 140		'Set the second part to the remainder
End If
Message 3 of 4

Anonymous
Not applicable

thanks i will try it.

0 Likes
Message 4 of 4

Anonymous
Not applicable

Justin  douse this look correct

 

If Parameter("Awning Perf:1", "PerfLengthW") <= 140 Then

     Feature.IsActive("Awning Perf:1", "PerfLengthW") = False
 
 Parameter("Awning Perf:1", "PerfLengthW") = TotalLength - 2.75
 
 Else
	 
	 Feature.IsActive("Awning Perf 2:1", "PerfLengthW") = True
	 
	 Parameter("Awning Perf:1", "PerfLengthW") = 140
	 
	 Parameter("Awning Perf 2:1", "PerfLengthW") = TotalLength - 2.75 - 140
	 	 	 	  
End If
0 Likes