Hi, there
I have the code (from Jice) using List below
targetlines=["*beam section,section=%s, elset=%s, material=%s",
"%s",
"%f, %f, %f"]
resultlines=[targetlines[0] % (dResult['SEC'],section_type,mat_data),
targetlines[1] % section_data,
targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180),
math.cos(float(dResult['ANG'])*math.pi/180),
0)]
, which worked well
However when I modified it to
targetlines=["*element,type=b31, elset=%s",
"%s",
"*beam section,section=%s, elset=%s, material=%s",
"%s",
"%f, %f, %f"]
resultlines=[targetlines[0] % dResult['SEC'],
targetlines[1] % (section_type,dResult['SEC'],mat_data),
targetlines[2] % line1b,
targetlines[3] % section_data,
targetlines[4] % (math.sin(float(dResult['ANG'])*math.pi/180),
math.cos(float(dResult['ANG'])*math.pi/180),
0)]
I got error below
"resultlines=[targetlines[0] % dResult,
TypeError: not all arguments converted during string formatting"
I cannot understand why as I already had value of dResult.
Could you please give some clue about it? Thank you a lot.
regards
ning