Feb-15-2022, 01:34 PM
I have this code and i want to loop through the number of cases in the list "Cases". here i put an example with 3 elements in the list.
how can I parameter the last line of the code (xyDataNames='RF : LMC,RF : NMC,RF : MMC', trueName='')
how can I parameter the last line of the code (xyDataNames='RF : LMC,RF : NMC,RF : MMC', trueName='')
Number_FEA = 3 Cases = ['LMC', 'NMC', 'MMC'] import sys sys.path.insert(46, r'c:/SIMULIA/EstProducts/2021/win_b64/code/python2.7/lib/abaqus_plugins/excelUtilities') import abq_ExcelUtilities.excelUtilities abq_ExcelUtilities.excelUtilities.XYtoExcel(xyDataNames='RF : LMC,RF : NMC,RF : MMC', trueName='')I tried this code with tuple, but it didn't work :
a = ['RF : %s' %Cases[k] for k in range(Number_Fea)] b = [v for v in a] import sys sys.path.insert(46, r'c:/SIMULIA/EstProducts/2021/win_b64/code/python2.7/lib/abaqus_plugins/excelUtilities') import abq_ExcelUtilities.excelUtilities abq_ExcelUtilities.excelUtilities.XYtoExcel(xyDataNames=tuple(b), trueName='')