My i Logic rule doesent work in one case

My i Logic rule doesent work in one case

Anonymous
Not applicable
308 Views
2 Replies
Message 1 of 3

My i Logic rule doesent work in one case

Anonymous
Not applicable

Hello again sorry but i muss know this.

 

Why doses a iLogic rule in one case his work?

 

I use If rule for 4 cases. For Supressing and deleting files.

 

I first 3 i make it work but in 4th it doesent:

 

If Parameter("Mittelpfosten_vorhanden")=0 Then

Component.IsActive("Mittelpfosten:1") = False
Component.IsActive("Komponentenanordnung 4:1") = False
Component.IsActive("Mittelpfosten:2") = False
Component.IsActive("Komponentenanordnung 5:1") = False
Component.IsActive("Mittelpfosten:3") = False
Component.IsActive("Komponentenanordnung 6:1") = False
Component.IsActive("Untere Lamelle_2:1") = False
Component.IsActive("Obere Lamelle_2:1") = False
Component.IsActive("Obere Lamelle_4:1") = False
Component.IsActive("Obere Lamelle_3:1") = False
Component.IsActive("Obere Lamelle_5:1") = False
Component.IsActive("Untere Lamelle_5:1") = False

 

 


End If


If Parameter("Mittelpfosten_vorhanden")=1 Then

Component.IsActive("Mittelpfosten:1") = True
Component.IsActive("Komponentenanordnung 4:1") = True
Component.IsActive("Mittelpfosten:2") = False
Component.IsActive("Komponentenanordnung 5:1") = False
Component.IsActive("Mittelpfosten:3") = False
Component.IsActive("Komponentenanordnung 6:1") = False
Component.IsActive("Untere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_4:1") = False
Component.IsActive("Obere Lamelle_3:1") = False
Component.IsActive("Obere Lamelle_5:1") = False
Component.IsActive("Untere Lamelle_5:1") = False
End If

If Parameter("Mittelpfosten_vorhanden")=2 Then

Component.IsActive("Mittelpfosten:1") = True
Component.IsActive("Komponentenanordnung 4:1") = True
Component.IsActive("Mittelpfosten:2") = True
Component.IsActive("Komponentenanordnung 5:1") =True
Component.IsActive("Mittelpfosten:3") = False
Component.IsActive("Komponentenanordnung 6:1") = False
Component.IsActive("Untere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_4:1") = True
Component.IsActive("Obere Lamelle_3:1") = True
Component.IsActive("Obere Lamelle_5:1") = False
Component.IsActive("Untere Lamelle_5:1") = False

End If

If Parameter("Mittelpfosten_vorhanden")=3 Then

Component.IsActive("Mittelpfosten:1") = True
Component.IsActive("Komponentenanordnung 4:1") = True
Component.IsActive("Mittelpfosten:2") = True
Component.IsActive("Komponentenanordnung 5:1") =True
Component.IsActive("Mittelpfosten:3") = True
Component.IsActive("Komponentenanordnung 6:1") = True
Component.IsActive("Obere Lamelle_4:1") = True
Component.IsActive("Obere Lamelle_3:1") = True
Component.IsActive("Obere Lamelle_5:1") = True
Component.IsActive("Untere Lamelle_5:1") = True
End If

 

InventorVb.DocumentUpdate()

iLogicVb.UpdateWhenDone = True

 

0 Likes
309 Views
2 Replies
Replies (2)
Message 2 of 3

CCarreiras
Mentor
Mentor

The last conditions don't mach with the first 3 ones, can't you see the difference?.... 

 

Besides this question was already awnsewerd...why you ask things over and over?

 

 

if.............then

elseif..........................then

elseif..........................then

elseif..........................then

end if

 

 

or use case cycle..... as you want.... Read about the difference between using "if then else" and "case". cycles

 

USE THESE STATEMENTS FOR THE LAST CONDITION

 

Component.IsActive("Mittelpfosten:1") = True
Component.IsActive("Komponentenanordnung 4:1") = True
Component.IsActive("Mittelpfosten:2") = True
Component.IsActive("Komponentenanordnung 5:1") =True
Component.IsActive("Mittelpfosten:3") = true
Component.IsActive("Komponentenanordnung 6:1") = true
Component.IsActive("Untere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_2:1") = True
Component.IsActive("Obere Lamelle_4:1") = True
Component.IsActive("Obere Lamelle_3:1") = True
Component.IsActive("Obere Lamelle_5:1") = True
Component.IsActive("Untere Lamelle_5:1") = true

 

 

 

Why not take a little time to study?...

CCarreiras

EESignature

Message 3 of 3

rossano_praderi
Collaborator
Collaborator
http://forums.autodesk.com/t5/inventor-customization/supress-with-ilogic-with-if-funktion/td-p/56711...


--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes