here is the code it doesnt work, does anyone sees somthing wrong?
If (Length = 96<>120) Feature.IsActive("Hole3") = True Feature.IsActive("Hole4") = True Feature.IsActive("Hole5") = True Else If (Length = 72<>96) Feature.IsActive("Hole3") = True Feature.IsActive("Hole4") = False Feature.IsActive("Hole5") = True Else If (Length = 48<>72) Feature.IsActive("Hole3") = False Feature.IsActive("Hole4") = True Feature.IsActive("Hole5") = False Else If (Length = 0<>48) Feature.IsActive("Hole4") = False Feature.IsActive("Hole3") = False Feature.IsActive("Hole5") = False End If If (Length = 96<>120) pat_no = 3 pat_dist = 45 Else If (Length = 72<>96) pat_no = 5 pat_dist = 60 Else If (Length = 48<>72) pat_no = 5 pat_dist = 60 Else If (Length = 0<>48) pat_no = 5 pat_dist = 60 End If iLogicVb.UpdateWhenDone = True ThisApplication.ActiveView.Fit
There are a couple of issues:
1. You need the word "Then" after the If condition (and after the Else If's)
If (Length = 96<>120) Then
2. Your condition makes no sense: In English, you've written "If length equals 96 doesn't equal 120" - and where I come from, I don't understand it 🙂
I think you want something like:
If (Length >= 96 and Length <= 120) Then
...
Else If (Length >= 72 and Length < 96) Then
...
Else If (Length >= 48 and Length < 72) Then
...
Else If (Length >= 0 and Length < 48) Then
I've used >= because you probably want to catch the 0, 48, 96 and 120 values. Without the = you'll find your code excludes those values and you might end up with some other error.
Use the same techniques to fix the remainder of your code.
Thank you very much
i have small question
If i have the rule in the part itself and the part is going to be in assembly how could i bring it in into my assembly
it doesnt show in the i logic rules?