Hi,
we are using Autodesk Inventor Professional 2022 and we are hawing problems with automated formatting of iLogic rules when we use "case else" in a rule.
See attached screenshots or the code below. This is just small part of a rule.
Wrong formatting, the "End If" after "End Select" and also the rest of the rule is shifted to the right which makes it very difficult to orient, I think it should be in line with the starting "If".
'LABEL PLATE AUTOMATIC CUSTOMER SELECTION
If LabelPLT_on_automatic = False Then
Select Case Customer
Case "NKT COLOGNE", "NEXANS ROGNAN"
LabelPLT_on = "ONE FLANGE ONLY"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case "BRUGG CABLES", "HEXATRONIC", "ELCOWIRE"
LabelPLT_on = "BOTH FLANGES"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case Else
LabelPLT_on = " NONE"
End Select
End If
'LABEL PLATE ON/OFF
Select Case LabelPLT_on
Case " NONE"
Component.IsActive("LABELPLT A") = False
Component.IsActive("LABELPLT B") = False
Component.IsActive("RIVET1 A") = False
Component.IsActive("RIVET2 A") = False
Component.IsActive("RIVET1 B") = False
Component.IsActive("RIVET2 B") = False
LabelPLT_on_switch = False
Correct formatting, "case else" is not used (commented) and the "End if" and rest of the rule is correctly on the left side.
'LABEL PLATE AUTOMATIC CUSTOMER SELECTION
If LabelPLT_on_automatic = False Then
Select Case Customer
Case "NKT COLOGNE", "NEXANS ROGNAN"
LabelPLT_on = "ONE FLANGE ONLY"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case "BRUGG CABLES", "HEXATRONIC", "ELCOWIRE"
LabelPLT_on = "BOTH FLANGES"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
' Case Else
' LabelPLT_on = " NONE"
End Select
End If
'LABEL PLATE ON/OFF
Select Case LabelPLT_on
Case " NONE"
Component.IsActive("LABELPLT A") = False
Component.IsActive("LABELPLT B") = False
Component.IsActive("RIVET1 A") = False
Component.IsActive("RIVET2 A") = False
Component.IsActive("RIVET1 B") = False
Component.IsActive("RIVET2 B") = False
LabelPLT_on_switch = False
Is this a bug or am I doing something wrong? Is there a way how I can fix the formatting?
Thank you
Hi,
we are using Autodesk Inventor Professional 2022 and we are hawing problems with automated formatting of iLogic rules when we use "case else" in a rule.
See attached screenshots or the code below. This is just small part of a rule.
Wrong formatting, the "End If" after "End Select" and also the rest of the rule is shifted to the right which makes it very difficult to orient, I think it should be in line with the starting "If".
'LABEL PLATE AUTOMATIC CUSTOMER SELECTION
If LabelPLT_on_automatic = False Then
Select Case Customer
Case "NKT COLOGNE", "NEXANS ROGNAN"
LabelPLT_on = "ONE FLANGE ONLY"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case "BRUGG CABLES", "HEXATRONIC", "ELCOWIRE"
LabelPLT_on = "BOTH FLANGES"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case Else
LabelPLT_on = " NONE"
End Select
End If
'LABEL PLATE ON/OFF
Select Case LabelPLT_on
Case " NONE"
Component.IsActive("LABELPLT A") = False
Component.IsActive("LABELPLT B") = False
Component.IsActive("RIVET1 A") = False
Component.IsActive("RIVET2 A") = False
Component.IsActive("RIVET1 B") = False
Component.IsActive("RIVET2 B") = False
LabelPLT_on_switch = False
Correct formatting, "case else" is not used (commented) and the "End if" and rest of the rule is correctly on the left side.
'LABEL PLATE AUTOMATIC CUSTOMER SELECTION
If LabelPLT_on_automatic = False Then
Select Case Customer
Case "NKT COLOGNE", "NEXANS ROGNAN"
LabelPLT_on = "ONE FLANGE ONLY"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
Case "BRUGG CABLES", "HEXATRONIC", "ELCOWIRE"
LabelPLT_on = "BOTH FLANGES"
Parameter("LABELPLT B", "Sketch_TextVisibility") = Customer
' Case Else
' LabelPLT_on = " NONE"
End Select
End If
'LABEL PLATE ON/OFF
Select Case LabelPLT_on
Case " NONE"
Component.IsActive("LABELPLT A") = False
Component.IsActive("LABELPLT B") = False
Component.IsActive("RIVET1 A") = False
Component.IsActive("RIVET2 A") = False
Component.IsActive("RIVET1 B") = False
Component.IsActive("RIVET2 B") = False
LabelPLT_on_switch = False
Is this a bug or am I doing something wrong? Is there a way how I can fix the formatting?
Thank you
I confirm this issue.
I recommend you to use VisualStudio for iLogic rules creation. Is it possible to use my solution iLogic for VisualStudio or ILogicRuleTester by @JelteDeJong
I confirm this issue.
I recommend you to use VisualStudio for iLogic rules creation. Is it possible to use my solution iLogic for VisualStudio or ILogicRuleTester by @JelteDeJong
Ok, so this really loooks like a bug.
Where can I report it, so they can maybe fix it?
Ok, so this really loooks like a bug.
Where can I report it, so they can maybe fix it?
Can't find what you're looking for? Ask the community or share your knowledge.