Hi, there
Let me put my resource line and target lines here firstly
resource line:
56 J=7224,164 SEC=CON450X450 ANG=45
target lines:
*beam section,section=R, elset=CON450X45056,material=con2
0.45,0.45
0.707107,0.707107,0
I have a dictionary below (created using woooee's code)
Frame_Section contains {'CON450X450': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.45,.45']], 'B400': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.16,.4']], 'FSEC1': [['MAT', 'CON3'], ['SH', 'P'], ['T', '.3048']], 'B400H': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.16,.4']], 'B200': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.16,.2']], 'B300': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.16,.3']]} .
I need to
1) search the dictionary Frame_Section to identify if 'CON450X450' exists;if so, extract data from "MAT" and "T" and put them into the target lines. For example, 0.45,0.45 comes from and con2 comes from .
2) using data just after "ANG=" to perform a simple maths calculation. For example, 0.707107,0.707107,0 comes from sin45, cos45,0 (45 comes from " ANG=45")
Be honest, these two questions are challenging for me as I just started using Python one month ago. I very appreciate your guide so that I can move further.
best wishes
ning