I have defined lists representing load factors. I want to loop over the following syntax to define new load combinations in ASE, but I can’t define the variable #fac inside the loop (see below). How can i do this?
let#fac1001 x,x,x,x,x,x,x,x ! Load factors LC 1001
let#fac1002 x,x,x,x,x,x,x,x ! Load factors LC 1002 etc.
loop#i 2
let#fac #fac(1001+#i)( : )
LC 1001+#i fact #fac(0)
LCC 1 fact #fac(0) ! Load 1
LCC 2 fact #fac(1) ! Load 2
LCC 3 fact #fac(2) ! Load 3
LCC 4 fact #fac(3) ! Load 4
endloop
You cannot treat the name of a variable as a variable itself !!!

Try this, please idea :
LET#fac1001 x,x,x,x,x,x,x,x ! Load factors for LC 1001
LET#fac1002 x,x,x,x,x,x,x,x ! Load factors for LC 1002
LET#LCC x,x,x,x,x,x,x,x ! Load case numbers to be copied
$$ The variables need to have the same length !!!
LOOP#i 2
LC 1001+#i TYPE NONE TITL 'NAME LC_#i'
LOOP#j LCC
IF (#i==0)
LET#fac #fac1001(#j)
ELSEIF (#i==1)
LET#fac #fac1002(#j)
ENDIF $$ You can add additional ELSEIF conditions if necessary; otherwise, end with an ELSE statement !!!
LCC #LCC(#j) FACT #fac ! Load case #j+1
ENDLOOP
ENDLOOP
Abderrahman OMRI
Thank you. This could be a possibility. However, I’m having around 400 combinations. That’s why I was looking for a solution where the definition af the variable #fac changes inside the loop. I think this is possible, but I can’t find a syntax that is running.
In this case, I use the interaction between Teddy and Excel, where you define all the load factors and the corresponding load cases in an Excel file. Then, you connect Teddy to Excel to run your loops. This creates a very smooth workflow, and you can easily manage everything directly from Excel.
Here is the link on SOFiSTiK FOR YOU with more details on how to connect Excel to Teddy:
Results for Excel - SOFiSTiK FOR YOU
Abderrahman OMRI