ASE Linear analysis - Loop over loadcases but leave out 2 of them

Hello
I have this simple piece of code that does linear analysis of all LC_SC.
I want to leave out LC 12 and 13.
When i try like this

loop#i LC_SC
if (#i <> (12) | (#i<>13)
LC #LC_SC(#i)
endif
endloop

It does not work. If i use below, it leaves out LC 12 as intended. What am i doing wrong, or is it not possible?

+PROG ASE urs:6 $ Linear Analysis - Straddle Carrier con area
HEAD
SYST PROB LINE ! Linear analysis
CTRL SOLV 4 ! Use “Direct Parallel Sparse Solver (PARDISO)” - Faster
CTRL WARN 185,398,399 ! Turn off warning for load outside plate

loop#i LC_SC
if #i <> 12
LC #LC_SC(#i)
endif
endloop

end

  • The parenthesises aren’t matching:
    You wrote: if (#i <> (12) | (#i<>13)
    Use: if (#i <> 12) | (#i<>13)
  • Also you want a logical &:
    if (#i <> (12) & (#i<>13)
  • If your as unsure about operator precedence as me, you add an extra layer of parenthesises (just in case):
    if ((#i <> (12) & (#i<>13))

Thank you! Just what i needed, it was just a simple mistake by me.
Great idea with just throwing all the parenthesises at it :stuck_out_tongue: