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

``````import math
# First of all, Frame_Section should contain the following. Otherwise, you'll have
# to seach for your elements in the lists
# for elt in list:
#     if elt[0]='MAT':
#         result=elt[1]
# This way is far better
Frame_Section={'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'}}

resline="56 J=7224,164 SEC=CON450X450 ANG=45"
targetlines=["*beam section,section=R, elset=%s,material=%s",
"%s",
"%f, %f"]
dResult={}
# Store your resline elements in a dictionary
# 1st we split using the spaces
for elt in resline.split():
keyValue=elt.split("=") # We separate the key from the value
# and store them in a tempo list
if len(keyValue)==2:
dResult[keyValue[0]]=keyValue[1]
try:
mat=Frame_Section[dResult['SEC']]['MAT'] # we get the MAT value
# And the T values
T=Frame_Section[dResult['SEC']]['T'].replace(".","0.") # To be simple,
# I do as if your floats always begin with a "." (less than 1)
resultlines=[targetlines[0] % (dResult['SEC'], mat),
targetlines[1] % T,
targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180), math.cos(float(dResult['ANG'])*math.pi/180))]
except KeyError:
print "%s doesn't exist" % dResult['SEC']

for line in resultlines:
print line``````

Hi, jice

Thank you so much.

I am trying your code. When resline changes "56 J=7224,164 SEC=CON450X450 ANG=45" to "56 J=7224,164 SEC=CON450X450 NSEG=3 ANG=45", the code prompts a bug. I am working on it and will update as soon as I get any progress.

Have a nice weekend

Ning

I changed the resline as suggested but everything works fine here.
What error have you got ?

Hi, Jice

The error is simple

``````Traceback (most recent call last):
File "<pyshell#25>", line 1, in -toplevel-
Frame_Section_dic
NameError: name 'Frame_Section_dic' is not defined
``````

My code is a copy of your code below

``````        if 'NSEG' in line1 and 'ANG' in line1:
dResult={}
targetlines=["*beam section,section=R, elset=%s, material=%s",
"%s",
"%f, %f, %f"]

for elt in line1.split():
keyValue=elt.split('=')   ##seperate key from value

if len(keyValue) == 2:
dResult[keyValue[0]]=keyValue[1]
mat_data=Frame_Section_dic[dResult['SEC']]['MAT']
#               print "mat_data=:", mat_data
T_data=Frame_Section_dic[dResult['SEC']]['T']
#               print "T_data=:", T_data
resultlines=[targetlines[0] % (dResult['SEC'],mat_data),
targetlines[1] % T_data,
targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180),
math.cos(float(dResult['ANG'])*math.pi/180),
0)]
#           except KeyError:
#                print "%s doesn't exist" % dResult['SEC']
for line9 in resultelines:
binf.write(line9)
``````

The code part in relation to dictionary definition is

``````def section_material_read(Shell_Section_dic,Frame_Section_dic,Material_dic):
Shell_Section_dic = {}
Frame_Section_dic = {}
Material_dic = {}
Ex_Material_rec = False
Ex_Frame_Section_rec = False
Ex_Shell_Section_rec = False   ##  indicates if previous rec starts with "NAME="
fp = open("LBP_tenfloor.s2k", "r")
for one_rec in fp:
if 'NAME' in one_rec and 'MAT' in one_rec and 'TYPE' in one_rec:
Shell_Section_dic, key = new_rec_list(one_rec, Shell_Section_dic)
Ex_Shell_Section_rec = True

else:
if Ex_Shell_Section_rec:   ## only if previous rec was a "NAME=" rec
Shell_Section_dic = append_rec_list(one_rec, Shell_Section_dic, key)
Ex_Shell_Section_rec = False

if 'NAME' in one_rec and 'MAT' in one_rec and 'TYPE' not in one_rec:
Frame_Section_dic, key = new_rec_list(one_rec, Frame_Section_dic)
Ex_Frame_Section_rec = True

else:
if Ex_Frame_Section_rec:   ## only if previous rec was a "NAME=" rec
Frame_Section_dic = append_rec_list(one_rec, Frame_Section_dic, key)
Ex_Frame_Section_rec = False

if 'NAME' in one_rec and 'IDES' in one_rec:
Material_dic, key = new_rec_list(one_rec, Material_dic)
Ex_Material_rec = True

else:
if Ex_Material_rec:   ## only if previous rec was a "NAME=" rec
Material_dic = append_rec_list(one_rec, Material_dic, key)
Ex_Material_rec = False

print "Shell_Section contains", Shell_Section_dic, "\n"
print "Frame_Section contains", Frame_Section_dic, "\n"
print "Material contains", Material_dic, "\n"
return Shell_Section_dic
return Frame_Section_dic
return Material_dic

``````

Both of them are written in the same Python file. I am lost again.

all the best

ning

I just put tags to see your code properly rendered

Hi, Jice

The error is simple

Traceback (most recent call last):
File "<pyshell#25>", line 1, in -toplevel-
Frame_Section_dic
NameError: name 'Frame_Section_dic' is not defined

My code is a copy of your code below

``````if 'NSEG' in line1 and 'ANG' in line1:
dResult={}
targetlines=["*beam section,section=R, elset=%s, material=%s",
"%s",
"%f, %f, %f"]

for elt in line1.split():
keyValue=elt.split('=')   ##seperate key from value

if len(keyValue) == 2:
dResult[keyValue[0]]=keyValue[1]
mat_data=Frame_Section_dic[dResult['SEC']]['MAT']
#               print "mat_data=:", mat_data
T_data=Frame_Section_dic[dResult['SEC']]['T']
#               print "T_data=:", T_data
resultlines=[targetlines[0] % (dResult['SEC'],mat_data),
targetlines[1] % T_data,
targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180),
math.cos(float(dResult['ANG'])*math.pi/180),
0)]
#           except KeyError:
#                print "%s doesn't exist" % dResult['SEC']
for line9 in resultelines:
binf.write(line9)

The code part in relation to dictionary definition is
Shell_Section_dic = {}
Frame_Section_dic = {}
Material_dic = {}
Ex_Material_rec = False
Ex_Frame_Section_rec = False
Ex_Shell_Section_rec = False   ##  indicates if previous rec starts with "NAME="
fp = PrivoxyWindowOpen("LBP_tenfloor.s2k", "r")
for one_rec in fp:
if 'NAME' in one_rec and 'MAT' in one_rec and 'TYPE' in one_rec:
Shell_Section_dic, key = new_rec_list(one_rec, Shell_Section_dic)
Ex_Shell_Section_rec = True

else:
if Ex_Shell_Section_rec:   ## only if previous rec was a "NAME=" rec
Shell_Section_dic = append_rec_list(one_rec, Shell_Section_dic, key)
Ex_Shell_Section_rec = False

if 'NAME' in one_rec and 'MAT' in one_rec and 'TYPE' not in one_rec:
Frame_Section_dic, key = new_rec_list(one_rec, Frame_Section_dic)
Ex_Frame_Section_rec = True

else:
if Ex_Frame_Section_rec:   ## only if previous rec was a "NAME=" rec
Frame_Section_dic = append_rec_list(one_rec, Frame_Section_dic, key)
Ex_Frame_Section_rec = False

if 'NAME' in one_rec and 'IDES' in one_rec:
Material_dic, key = new_rec_list(one_rec, Material_dic)
Ex_Material_rec = True

else:
if Ex_Material_rec:   ## only if previous rec was a "NAME=" rec
Material_dic = append_rec_list(one_rec, Material_dic, key)
Ex_Material_rec = False

print "Shell_Section contains", Shell_Section_dic, "\n"
print "Frame_Section contains", Frame_Section_dic, "\n"
print "Material contains", Material_dic, "\n"
return Shell_Section_dic
return Frame_Section_dic
return Material_dic

Both of them are written in the same Python file. I am lost again.

all the best

ning

haha, you did some copy errors :

Hi, Jice

``````if 'NSEG' in line1 and 'ANG' in line1:
dResult={}
targetlines=["*beam section,section=R, elset=%s, material=%s",
"%s",
"%f, %f, %f"]

for elt in line1.split():
keyValue=elt.split('=')   ##seperate key from value

if len(keyValue) == 2:
dResult[keyValue[0]]=keyValue[1]
####################################
# HERE you deleted the try statement without correct
# the indent (this should be 4 spaces left, like this : )
####################################
mat_data=Frame_Section_dic[dResult['SEC']]['MAT']
T_data=Frame_Section_dic[dResult['SEC']]['T']
resultlines=[targetlines[0] % (dResult['SEC'],mat_data),
targetlines[1] % T_data,
targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180),
math.cos(float(dResult['ANG'])*math.pi/180),
0)]
for line9 in resultelines:
binf.write(line9)``````

But I'm not sure your error comes from this code...
It means that your Frame_Section_dic is not created before you use it (something like var=Frame_Section_dic[...]) when you modify your line.
But, as your code isn't complete, I can't see where this occurs (you can send me your whole code in PM if you want a more complete advise)
Anyway, try the correction I've posted and tell me if this works :)

Hi,

Just update something for this problem. I believe the problem is function section_material_read() from Line 27 to 68.
Even "Return" were used to save the obtained dictionaries: Shell_Section_dic, Frame_Section_dic and Material_dic in the function, these three dictionaries were not saved properly for later use. I do not know what is going on about it?

Could you please point out the error I made? thank you so much.

best wishes

ning

As far as I could go (as I can't execute everything) is that you call a function without having defined the parameters :

``section_material_read(Shell_Section_dic,Frame_Section_dic,Material_dic)``

At this point of your program, these variables (Shell_Section_dic, Frame_Section_dic, Material_dic) are not defined yet.
Simply do this here rather than in the section_material_read function :

``````Shell_Section_dic = {}
Frame_Section_dic = {}
Material_dic = {}

and this error will normally disapear

don't put a function def, then some standalone lines of code then some function def again and some more standalone lines then other functions...
This makes your code hard to follow.

Put all your code in short functions (if not in classes) and, at the end of your file, one function call. That's all.
A good program is a well organised program. If not well organised, your program will never be able to grow properly.

good luck

Hi, jice,

The error does disappear with your detailed guide. I should read a simple Python book through to avoid this kind of fatal erros. I have also not pondered the structure of this code as I thought I would finish it within a week. I will spend a day to tidy up this code. Thank you a lot.

Now a new error comes out:

Traceback (most recent call last):
File "C:/ning/study/test070409a.py", line 245, in -toplevel-
mat_data=Frame_Section_dic[dResult]
TypeError: list indices must be integers

I guess this is due to my profound Frame_Section_dic. For convenience, I put three dicts here:
Material_dic: {'STEEL': [['IDES', 'S'], ['W', '76819.41'], ['T', '0'], ['E', '1.99948E+11'], ['U', '.3'], ['A', '.0000117'], ['FY', '3.447379E+08']], 'S335': [['IDES', 'S'], ['W', '78500.3'], ['T', '0'], ['E', '2.05E+11'], ['U', '.3'], ['A', '.0000117'], ['FY', '3.35E+08']], 'OTHER': [['IDES', 'N'], ['W', '76819.55'], ['T', '0'], ['E', '1.99948E+11'], ['U', '.3'], ['A', '.0000117']], 'S345': [['IDES', 'S'], ['W', '78500.3'], ['T', '0'], ['E', '2.05E+11'], ['U', '.3'], ['A', '.0000117'], ['FY', '3.45E+08']], 'S355': [['IDES', 'S'], ['W', '78500.27'], ['T', '0'], ['E', '2.05E+11'], ['U', '.3'], ['A', '.0000117'], ['FY', '3.557E+08']], 'GLASS': [['IDES', 'C'], ['W', '26000'], ['T', '0'], ['E', '7.2E+10'], ['U', '.235'], ['A', '.000008']], 'CONC': [['IDES', 'C'], ['W', '23561.61'], ['T', '0'], ['E', '2.482113E+10'], ['U', '.2'], ['A', '.0000099']], 'S325': [['IDES', 'S'], ['W', '78500.3'], ['T', '0'], ['E', '2.05E+11'], ['U', '.3'], ['A', '.0000117'], ['FY', '3.25E+08']], 'MAC520': [['IDES', 'S'], ['W', '76820'], ['T', '0'], ['E', '2.482113E+10'], ['U', '.3'], ['A', '.0000117'], ['FY', '5.2E+08']], 'LWC': [['IDES', 'C'], ['W', '19000'], ['T', '0'], ['E', '2.482E+10'], ['U', '.2'], ['A', '.0000099']]}

Frame_Section_dic: {'LCHS610-25-4': [['MAT', 'S355'], ['SH', 'P'], ['T', '.61,.0254']], 'F500X250X10X17': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.25,.017,.01,.25,.017']], 'F500X250X10X15': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.25,.015,.01,.25,.015']], '356X406X551UCWITH80PLATES': [['MAT', 'S325'], ['SH', 'B'], ['T', '.4556,.5785,.0675,.08']], 'UC356X368X129': [['MAT', 'STEEL'], ['A', '.0164'], ['J', '1.53E-06'], ['I', '.0004025,.0001461'], ['AS', '3.69824E-03,1.075083E-02'], ['S', '2.26378E-03,7.927293E-04'], ['Z', '.00248,.0012'], ['R', '.156661,9.438504E-02'], ['T', '.3556,.3686,.0175,.0104,.3686,.0175'], ['SHN', 'UC356X368X129'], ['DSG', 'W']], 'UB305X165X46': [['MAT', 'STEEL'], ['A', '.00587'], ['J', '2.22E-07'], ['I', '9.899E-05,8.96E-06'], ['AS', '2.05422E-03,3.258767E-03'], ['S', '6.457273E-04,1.081473E-04'], ['Z', '.00072,.000166'], ['R', '.1298604,3.906924E-02'], ['T', '.3066,.1657,.0118,.0067,.1657,.0118'], ['SHN', 'UB305X165X46'], ['DSG', 'W']], 'UB305X165X40': [['MAT', 'STEEL'], ['A', '.00513'], ['J', '1.47E-07'], ['I', '8.503E-05,7.64E-06'], ['AS', '.0018204,.002805'], ['S', '5.605142E-04,9.260606E-05'], ['Z', '.000623,.000142'], ['R', '.1287441,3.859118E-02'], ['T', '.3034,.165,.0102,.006,.165,.0102'], ['SHN', 'UB305X165X40'], ['DSG', 'W']], 'LCHS965-22-2': [['MAT', 'S355'], ['SH', 'P'], ['T', '.965,.0222']], 'LCHS914-32': [['MAT', 'S355'], ['SH', 'P'], ['T', '.914,.032']], 'UC356X406X340': [['MAT', 'STEEL'], ['A', '.0433'], ['J', '2.343E-05'], ['I', '.001225,.0004685'], ['AS', '1.081024E-02,.0288145'], ['S', '6.028544E-03,2.325062E-03'], ['Z', '.007,.00354'], ['R', '.1681993,.1040186'], ['T', '.4064,.403,.0429,.0266,.403,.0429'], ['SHN', 'UC356X406X340'], ['DSG', 'W']], 'UC254X254X107': [['MAT', 'STEEL'], ['A', '.0136'], ['J', '1.72E-06'], ['I', '.0001751,5.928E-05'], ['AS', '3.41376E-03,8.842333E-03'], ['S', '1.313086E-03,4.581144E-04'], ['Z', '.00148,.000697'], ['R', '.1134681,6.602139E-02'], ['T', '.2667,.2588,.0205,.0128,.2588,.0205'], ['SHN', 'UC254X254X107'], ['DSG', 'W']], 'UB254X146X37': [['MAT', 'STEEL'], ['A', '.00472'], ['J', '1.53E-07'], ['I', '5.537E-05,5.71E-06'], ['AS', '.0016128,.0026596'], ['S', '4.325781E-04,7.800547E-05'], ['Z', '.000483,.000119'], ['R', '.1083094,.0347814'], ['T', '.256,.1464,.0109,.0063,.1464,.0109'], ['SHN', 'UB254X146X37'], ['DSG', 'W']], 'F500X220X10X15': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.22,.015,.01,.22,.015']], 'T': [['MAT', 'STEEL'], ['SH', 'I'], ['T', '.18,.01,.01,.008,.2,.01']], 'UC305X305X118': [['MAT', 'STEEL'], ['A', '.015'], ['J', '1.61E-06'], ['I', '.0002767,9.059E-05'], ['AS', '.003774,9.580634E-03'], ['S', '1.759618E-03,5.893949E-04'], ['Z', '.00196,.000895'], ['R', '.1358185,7.771315E-02'], ['T', '.3145,.3074,.0187,.012,.3074,.0187'], ['SHN', 'UC305X305X118'], ['DSG', 'W']], 'UC305X305X198': [['MAT', 'STEEL'], ['A', '.0252'], ['J', '7.34E-06'], ['I', '.000509,.000163'], ['AS', '6.49209E-03,1.645883E-02'], ['S', '2.994999E-03,1.036566E-03'], ['Z', '.00344,.00158'], ['R', '.1421211,8.042546E-02'], ['T', '.3399,.3145,.0314,.0191,.3145,.0314'], ['SHN', 'UC305X305X198'], ['DSG', 'W']], 'LCHS813-15-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '.813,.0159']], 'CS300X100X46': [['MAT', 'S355'], ['SH', 'C'], ['T', '.3,.1,.0165,.009']], 'UC356X406X467': [['MAT', 'STEEL'], ['A', '.0595'], ['J', '5.809E-05'], ['I', '.00183,.0006783'], ['AS', '1.563028E-02,.039846'], ['S', '8.382958E-03,3.291121E-03'], ['Z', '.01,.00503'], ['R', '.1753747,.1067708'], ['T', '.4366,.4122,.058,.0358,.4122,.058'], ['SHN', 'UC356X406X467'], ['DSG', 'W']], 'FAB50': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.16,.015,.012,.16,.015']], 'F500X160X10X10': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.16,.01,.01,.16,.01']], 'F500X160X10X12': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.16,.012,.01,.16,.012']], 'UB305X102X25': [['MAT', 'STEEL'], ['A', '.00316'], ['J', '4.77E-08'], ['I', '4.455E-05,1.23E-06'], ['AS', '1.76958E-03,1.185333E-03'], ['S', '2.920354E-04,2.42126E-05'], ['Z', '.000342,.0000388'], ['R', '.1187354,1.972918E-02'], ['T', '.3051,.1016,.007,.0058,.1016,.007'], ['SHN', 'UB305X102X25'], ['DSG', 'W']], '356X406X467UCWITH50PLATES': [['MAT', 'S335'], ['SH', 'B'], ['T', '.4366,.5122,.058,.05']], 'UB305X102X28': [['MAT', 'STEEL'], ['A', '.00359'], ['J', '7.4E-08'], ['I', '5.366E-05,1.55E-06'], ['AS', '.0018522,1.493067E-03'], ['S', '3.476514E-04,3.045187E-05'], ['Z', '.000403,.0000485'], ['R', '.1222582,2.077871E-02'], ['T', '.3087,.1018,.0088,.006,.1018,.0088'], ['SHN', 'UB305X102X28'], ['DSG', 'W']], '356X406X393UCWITH50PLATES': [['MAT', 'S335'], ['SH', 'B'], ['T', '.419,.507,.0492,.05']], 'UB305X127X37': [['MAT', 'STEEL'], ['A', '.00472'], ['J', '1.48E-07'], ['I', '7.171E-05,3.36E-06'], ['AS', '2.16124E-03,2.200633E-03'], ['S', '4.711564E-04,5.445705E-05'], ['Z', '.000539,.0000854'], ['R', '.1232591,2.668079E-02'], ['T', '.3044,.1234,.0107,.0071,.1234,.0107'], ['SHN', 'UB305X127X37'], ['DSG', 'W']], 'FAB115': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.4,.03,.03,.4,.03']], 'UC254X254X73': [['MAT', 'STEEL'], ['A', '.00931'], ['J', '5.76E-07'], ['I', '.0001141,3.908E-05'], ['AS', '2.18526E-03,6.025533E-03'], ['S', '8.980716E-04,3.069914E-04'], ['Z', '.000992,.000465'], ['R', '.1107052,6.478918E-02'], ['T', '.2541,.2546,.0142,.0086,.2546,.0142'], ['SHN', 'UC254X254X73'], ['DSG', 'W']], '750X750X60JUMBOBOX': [['MAT', 'S335'], ['SH', 'B'], ['T', '.75,.75,.06,.06']], 'LCHS660-27': [['MAT', 'S355'], ['SH', 'P'], ['T', '.66,.027']], 'UC305X305X97': [['MAT', 'STEEL'], ['A', '.0123'], ['J', '9.12E-07'], ['I', '.0002225,7.308E-05'], ['AS', '3.04821E-03,7.836033E-03'], ['S', '1.445275E-03,4.787422E-04'], ['Z', '.00159,.000726'], ['R', '.134497,7.708089E-02'], ['T', '.3079,.3053,.0154,.0099,.3053,.0154'], ['SHN', 'UC305X305X97'], ['DSG', 'W']], 'UB356X171X51': [['MAT', 'STEEL'], ['A', '.00649'], ['J', '2.38E-07'], ['I', '.0001414,9.68E-06'], ['AS', '.002627,3.287083E-03'], ['S', '7.966196E-04,1.128863E-04'], ['Z', '.000896,.000174'], ['R', '.1476054,3.862027E-02'], ['T', '.355,.1715,.0115,.0074,.1715,.0115'], ['SHN', 'UB356X171X51'], ['DSG', 'W']], 'LCHS1067-23-8': [['MAT', 'S355'], ['SH', 'P'], ['T', '1.067,.0238']], 'UB305X102X33': [['MAT', 'STEEL'], ['A', '.00418'], ['J', '1.22E-07'], ['I', '6.501E-05,1.94E-06'], ['AS', '2.06382E-03,.0018432'], ['S', '4.157979E-04,3.789063E-05'], ['Z', '.000481,.00006'], ['R', '.1247102,2.154332E-02'], ['T', '.3127,.1024,.0108,.0066,.1024,.0108'], ['SHN', 'UB305X102X33'], ['DSG', 'W']], '600X400X32JUMBORHS': [['MAT', 'S345'], ['SH', 'B'], ['T', '.4,.6,.032,.032']], 'UC203X203X46': [['MAT', 'STEEL'], ['A', '.00587'], ['J', '2.22E-07'], ['I', '4.568E-05,1.548E-05'], ['AS', '1.46304E-03,3.732667E-03'], ['S', '4.496063E-04,1.520629E-04'], ['Z', '.000497,.000231'], ['R', '8.821531E-02,5.135307E-02'], ['T', '.2032,.2036,.011,.0072,.2036,.011'], ['SHN', 'UC203X203X46'], ['DSG', 'W']], 'EA120X120X15': [['MAT', 'STEEL'], ['A', '.0034'], ['J', '2.7E-07'], ['I', '4.48E-06,4.48E-06'], ['AS', '.0018,.0018'], ['S', '7.466667E-05,7.466667E-05'], ['Z', '9.608333E-05,9.608333E-05'], ['R', '3.629941E-02,3.629941E-02'], ['T', '.12,.12,.015,.015,0,0'], ['SHN', 'EA120X120X15'], ['DSG', 'L']], 'SHS100-5': [['MAT', 'S355'], ['SH', 'B'], ['T', '.1,.1,.005,.005']], '356X406X634UCWITH80PLATES': [['MAT', 'S325'], ['SH', 'B'], ['T', '.4746,.584,.077,.08']], 'LCHS762-28-6': [['MAT', 'S355'], ['SH', 'P'], ['T', '.762,.0286']], 'F500X280X15X17': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.28,.017,.015,.28,.017']], 'LCHS1016-15-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '1.016,.0159']], 'FAB125': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.2,.02,.015,.2,.02']], 'LCHS1016-23-8': [['MAT', 'S355'], ['SH', 'P'], ['T', '1.016,.0238']], 'CHS273-10': [['MAT', 'S355'], ['SH', 'P'], ['T', '.273,.01']], 'UC356X368X177': [['MAT', 'STEEL'], ['A', '.0226'], ['J', '3.81E-06'], ['I', '.0005712,.0002053'], ['AS', '5.30208E-03,.0147798'], ['S', '3.102662E-03,1.101986E-03'], ['Z', '.00346,.00167'], ['R', '.158979,9.531039E-02'], ['T', '.3682,.3726,.0238,.0144,.3726,.0238'], ['SHN', 'UC356X368X177'], ['DSG', 'W']], 'UB203X102X23': [['MAT', 'STEEL'], ['A', '.00294'], ['J', '7.02E-08'], ['I', '2.105E-05,1.64E-06'], ['AS', '1.09728E-03,.0015779'], ['S', '2.07185E-04,3.222004E-05'], ['Z', '.000234,.0000498'], ['R', '8.461598E-02,2.361828E-02'], ['T', '.2032,.1018,.0093,.0054,.1018,.0093'], ['SHN', 'UB203X102X23'], ['DSG', 'W']], 'UB356X127X39': [['MAT', 'STEEL'], ['A', '.00498'], ['J', '1.51E-07'], ['I', '.0001017,3.58E-06'], ['AS', '2.33244E-03,.002247'], ['S', '5.755518E-04,5.68254E-05'], ['Z', '.000659,.0000891'], ['R', '.1429045,2.681185E-02'], ['T', '.3534,.126,.0107,.0066,.126,.0107'], ['SHN', 'UB356X127X39'], ['DSG', 'W']], 'UC203X203X52': [['MAT', 'STEEL'], ['A', '.00663'], ['J', '3.18E-07'], ['I', '5.259E-05,1.778E-05'], ['AS', '1.62898E-03,4.25625E-03'], ['S', '5.100873E-04,1.740578E-04'], ['Z', '.000567,.000264'], ['R', '8.906249E-02,5.178561E-02'], ['T', '.2062,.2043,.0125,7.900001E-03,.2043,.0125'], ['SHN', 'UC203X203X52'], ['DSG', 'W']], 'F500X200X10X15': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.2,.015,.01,.2,.015']], 'LB500': [['MAT', 'CONC'], ['SH', 'R'], ['T', '.7,.5']], 'UC356X406X393': [['MAT', 'STEEL'], ['A', '.0501'], ['J', '3.545E-05'], ['I', '.001466,.0005537'], ['AS', '.0128214,.033374'], ['S', '6.997613E-03,2.720885E-03'], ['Z', '.00822,.00415'], ['R', '.1710599,.105128'], ['T', '.419,.407,.0492,.0306,.407,.0492'], ['SHN', 'UC356X406X393'], ['DSG', 'W']], 'F500X280X10X17': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.28,.017,.01,.28,.017']], 'UB203X133X25': [['MAT', 'STEEL'], ['A', '.0032'], ['J', '5.96E-08'], ['I', '.0000234,3.08E-06'], ['AS', '1.15824E-03,.0017316'], ['S', '2.30315E-04,4.624625E-05'], ['Z', '.000258,.0000709'], ['R', '8.551316E-02,3.102418E-02'], ['T', '.2032,.1332,.0078,.0057,.1332,.0078'], ['SHN', 'UB203X133X25'], ['DSG', 'W']], 'LCHS914-22-2': [['MAT', 'S355'], ['SH', 'P'], ['T', '.914,.0222']], 'LCHS508-11-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '.508,.0119']], 'F500X320X20X25': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.32,.025,.02,.32,.025']], 'F101D': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.15,.015,.012,.15,.015']], 'UB356X171X45': [['MAT', 'STEEL'], ['A', '.00573'], ['J', '1.58E-07'], ['I', '.0001207,8.11E-06'], ['AS', '.0024598,2.766117E-03'], ['S', '6.869664E-04,9.479836E-05'], ['Z', '.000775,.000147'], ['R', '.1451364,3.762124E-02'], ['T', '.3514,.1711,9.699999E-03,.007,.1711,9.699999E-03'], ['SHN', 'UB356X171X45'], ['DSG', 'W']], 'UC356X406X551': [['MAT', 'STEEL'], ['A', '.0702'], ['J', '.0000924'], ['I', '.002269,.0008267'], ['AS', '1.918076E-02,4.708125E-02'], ['S', '9.960491E-03,3.950777E-03'], ['Z', '.0121,.00606'], ['R', '.179783,.1085189'], ['T', '.4556,.4185,.0675,.0421,.4185,.0675'], ['SHN', 'UC356X406X551'], ['DSG', 'W']], 'CHS193-7-8': [['MAT', 'S355'], ['SH', 'P'], ['T', '.1937,.008']], 'LB500X1200': [['MAT', 'CONC'], ['SH', 'R'], ['T', '1.2,.5']], 'UC356X406X634': [['MAT', 'STEEL'], ['A', '.0808'], ['J', '.0001372'], ['I', '.002748,9.813001E-04'], ['AS', '2.259096E-02,5.441333E-02'], ['S', '1.158028E-02,4.628774E-03'], ['Z', '.0142,.00711'], ['R', '.1844177,.1102035'], ['T', '.4746,.424,.077,.0476,.424,.077'], ['SHN', 'UC356X406X634'], ['DSG', 'W']], 'UB254X102X25': [['MAT', 'STEEL'], ['A', '.0032'], ['J', '6.42E-08'], ['I', '3.415001E-05,1.49E-06'], ['AS', '.0015432,.0014266'], ['S', '2.655521E-04,2.924436E-05'], ['Z', '.000306,.000046'], ['R', '.1033048,2.157835E-02'], ['T', '.2572,.1019,.0084,.006,.1019,.0084'], ['SHN', 'UB254X102X25'], ['DSG', 'W']], 'UC203X203X60': [['MAT', 'STEEL'], ['A', '.00764'], ['J', '4.72E-07'], ['I', '6.125E-05,2.065E-05'], ['AS', '1.97024E-03,.0048706'], ['S', '5.844465E-04,2.006803E-04'], ['Z', '.000656,.000305'], ['R', '8.953779E-02,5.198922E-02'], ['T', '.2096,.2058,.0142,.0094,.2058,.0142'], ['SHN', 'UC203X203X60'], ['DSG', 'W']], 'F500X200X10X20': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.2,.02,.01,.2,.02']], 'F500X200X10X22': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.2,.022,.01,.2,.022']], 'UB254X102X22': [['MAT', 'STEEL'], ['A', '.0028'], ['J', '4.15E-08'], ['I', '2.841E-05,1.19E-06'], ['AS', '.0014478,1.151467E-03'], ['S', '2.237008E-04,2.34252E-05'], ['Z', '.000259,.0000373'], ['R', '.1007295,2.061553E-02'], ['T', '.254,.1016,.0068,.0057,.1016,.0068'], ['SHN', 'UB254X102X22'], ['DSG', 'W']], 'UC305X305X283': [['MAT', 'STEEL'], ['A', '.036'], ['J', '2.034E-05'], ['I', '.0007887,.0002463'], ['AS', '9.790039E-03,.0236817'], ['S', '4.318095E-03,1.528864E-03'], ['Z', '.00511,.00234'], ['R', '.1480146,8.271437E-02'], ['T', '.3653,.3222,.0441,.0268,.3222,.0441'], ['SHN', 'UC305X305X283'], ['DSG', 'W']], 'UB305X127X48': [['MAT', 'STEEL'], ['A', '.00612'], ['J', '3.18E-07'], ['I', '9.575E-05,4.61E-06'], ['AS', '.002799,2.923667E-03'], ['S', '6.157556E-04,7.35834E-05'], ['Z', '.000711,.000116'], ['R', '.1250817,2.744573E-02'], ['T', '.311,.1253,.014,.009,.1253,.014'], ['SHN', 'UB305X127X48'], ['DSG', 'W']], 'UC305X305X158': [['MAT', 'STEEL'], ['A', '.0201'], ['J', '3.78E-06'], ['I', '.0003875,.0001257'], ['AS', '5.16818E-03,1.296667E-02'], ['S', '2.369306E-03,8.078406E-04'], ['Z', '.00268,.00123'], ['R', '.1388474,7.908054E-02'], ['T', '.3271,.3112,.025,.0158,.3112,.025'], ['SHN', 'UC305X305X158'], ['DSG', 'W']], 'F500X340X20X20': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.34,.02,.02,.34,.02']], 'UB356X171X57': [['MAT', 'STEEL'], ['A', '.00726'], ['J', '3.34E-07'], ['I', '.0001604,1.108E-05'], ['AS', '.0028998,.003731'], ['S', '8.960894E-04,1.286876E-04'], ['Z', '.00101,.000199'], ['R', '.1486394,3.906624E-02'], ['T', '.358,.1722,.013,.0081,.1722,.013'], ['SHN', 'UB356X171X57'], ['DSG', 'W']], 'UC356X368X202': [['MAT', 'STEEL'], ['A', '.0257'], ['J', '5.58E-06'], ['I', '.0006626,.0002369'], ['AS', '.0061809,.0168615'], ['S', '3.53764E-03,1.264478E-03'], ['Z', '.00397,.00192'], ['R', '.1605681,9.600989E-02'], ['T', '.3746,.3747,.027,.0165,.3747,.027'], ['SHN', 'UC356X368X202'], ['DSG', 'W']], 'F500X340X20X28': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.34,.028,.02,.34,.028']], 'UC356X406X235': [['MAT', 'STEEL'], ['A', '.0299'], ['J', '8.12E-06'], ['I', '.0007908,.0003099'], ['AS', '.0070104,.0198716'], ['S', '4.151181E-03,1.569909E-03'], ['Z', '.00469,.00238'], ['R', '.1626289,.1018064'], ['T', '.381,.3948,.0302,.0184,.3948,.0302'], ['SHN', 'UC356X406X235'], ['DSG', 'W']], 'FABDUMMYTWINBEAMS': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.35,.05,.025,.35,.05']], 'UC203X203X71': [['MAT', 'STEEL'], ['A', '.00904'], ['J', '8.02E-07'], ['I', '7.618E-05,2.537E-05'], ['AS', '.002158,.0059512'], ['S', '7.060241E-04,2.458333E-04'], ['Z', '.000799,.000374'], ['R', '9.179865E-02,5.297562E-02'], ['T', '.2158,.2064,.0173,.01,.2064,.0173'], ['SHN', 'UC203X203X71'], ['DSG', 'W']], 'LCHS711-27': [['MAT', 'S355'], ['SH', 'P'], ['T', '.711,.027']], 'LCHS864-15-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '.864,.0159']], 'LCHS559-15-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '.559,.0159']], 'F500X280X15X20': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.28,.02,.015,.28,.02']], 'UC356X406X287': [['MAT', 'STEEL'], ['A', '.0366'], ['J', '1.441E-05'], ['I', '.0009988,.0003868'], ['AS', '8.895359E-03,.0242725'], ['S', '5.075203E-03,1.938847E-03'], ['Z', '.00581,.00295'], ['R', '.1651957,.1028023'], ['T', '.3936,.399,.0365,.0226,.399,.0365'], ['SHN', 'UC356X406X287'], ['DSG', 'W']], 'UB356X171X67': [['MAT', 'STEEL'], ['A', '.00855'], ['J', '5.57E-07'], ['I', '.0001946,1.362E-05'], ['AS', '3.30694E-03,4.532066E-03'], ['S', '1.070996E-03,1.572748E-04'], ['Z', '.00121,.000243'], ['R', '.150865,3.991218E-02'], ['T', '.3634,.1732,.0157,.0091,.1732,.0157'], ['SHN', 'UB356X171X67'], ['DSG', 'W']], 'LCHS1067-15-9': [['MAT', 'S355'], ['SH', 'P'], ['T', '1.067,.0159']], 'UB254X146X31': [['MAT', 'STEEL'], ['A', '.00397'], ['J', '8.55E-08'], ['I', '4.413E-05,4.48E-06'], ['AS', '.0015084,.0020941'], ['S', '3.51074E-04,6.132785E-05'], ['Z', '.000393,.0000941'], ['R', '.1054318,3.359261E-02'], ['T', '.2514,.1461,.0086,.006,.1461,.0086'], ['SHN', 'UB254X146X31'], ['DSG', 'W']], 'LCHS1016-32': [['MAT', 'S355'], ['SH', 'P'], ['T', '1.016,.032']], 'CHS139-7-8': [['MAT', 'S355'], ['SH', 'P'], ['T', '.1397,.008']], 'UB356X127X33': [['MAT', 'STEEL'], ['A', '.00421'], ['J', '8.79E-08'], ['I', '8.248999E-05,.0000028'], ['AS', '.002094,.0017765'], ['S', '4.72722E-04,4.46571E-05'], ['Z', '.000543,.0000703'], ['R', '.1399779,.0257892'], ['T', '.349,.1254,.0085,.006,.1254,.0085'], ['SHN', 'UB356X127X33'], ['DSG', 'W']], 'UC305X305X137': [['MAT', 'STEEL'], ['A', '.0174'], ['J', '2.49E-06'], ['I', '.0003281,.000107'], ['AS', '.0044229,1.118273E-02'], ['S', '2.047426E-03,6.921087E-04'], ['Z', '.0023,.00105'], ['R', '.1373183,7.841828E-02'], ['T', '.3205,.3092,.0217,.0138,.3092,.0217'], ['SHN', 'UC305X305X137'], ['DSG', 'W']], '800X800X60JUMBOBOX': [['MAT', 'S335'], ['SH', 'B'], ['T', '.8,.8,.06,.06']], 'F500X420X25X35': [['MAT', 'STEEL'], ['SH', 'I'], ['T', '.5,.42,.035,.025,.42,.035']], 'LCHS813-28-6': [['MAT', 'S355'], ['SH', 'P'], ['T', '.813,.0286']], 'LCHS965-14-3': [['MAT', 'S355'], ['SH', 'P'], ['T', '.965,.0143']], 'F500X300X10X20': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.3,.02,.01,.3,.02']], 'UB203X133X30': [['MAT', 'STEEL'], ['A', '.00382'], ['J', '1.03E-07'], ['I', '2.896E-05,3.85E-06'], ['AS', '1.32352E-03,.0021424'], ['S', '2.800774E-04,5.75056E-05'], ['Z', '.000314,.0000882'], ['R', '8.706981E-02,3.174671E-02'], ['T', '.2068,.1339,.0096,.0064,.1339,.0096'], ['SHN', 'UB203X133X30'], ['DSG', 'W']], 'F500X350X20X35': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.35,.035,.02,.35,.035']], 'F500X300X10X25': [['MAT', 'S355'], ['SH', 'I'], ['T', '.5,.3,.025,.01,.3,.025']], 'UB305X165X54': [['MAT', 'STEEL'], ['A', '.00688'], ['J', '3.48E-07'], ['I', '.000117,1.063E-05'], ['AS', '2.45216E-03,3.810883E-03'], ['S', '7.53866E-04,1.273817E-04'], ['Z', '.000846,.000196'], ['R', '.1304063,3.930723E-02'], ['T', '.3104,.1669,.0137,7.900001E-03,.1669,.0137'], ['SHN', 'UB305X165X54'], ['DSG', 'W']], 'UC356X368X153': [['MAT', 'STEEL'], ['A', '.0195'], ['J', '2.51E-06'], ['I', '.0004859,.0001755'], ['AS', '.0044526,1.278225E-02'], ['S', '2.684531E-03,9.473684E-04'], ['Z', '.00297,.00144'], ['R', '.1578542,9.486833E-02'], ['T', '.362,.3705,.0207,.0123,.3705,.0207'], ['SHN', 'UC356X368X153'], ['DSG', 'W']]}

Shell_Section_dic: {'FS450': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.45']], 'S200': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.2']], 'MEISER': [['MAT', 'STEEL'], ['TYPE', 'Membr'], ['TH', '.05'], ['THB', '.001']], '130SLAB': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.32']], 'WALL1': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.25']], 'W500': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.5']], 'LWC130': [['MAT', 'LWC'], ['TYPE', 'Membr'], ['TH', '.13']], 'W400': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.4']], 'P130': [['MAT', 'CONC'], ['TYPE', 'Plate,Thin'], ['TH', '.13']], 'SAPSLAB': [['MAT', 'LWC'], ['TYPE', 'Shell,Thin'], ['TH', '.13']], 'S320': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.32']], 'D130': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.115']], 'SLAB1': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.25']], 'W300': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.3']], 'S130RA': [['MAT', 'LWC'], ['TYPE', 'Membr'], ['TH', '.13']], 'W450': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.45']], 'S250': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.25']], 'W200': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.2']], 'LUXCRETE': [['MAT', 'S345'], ['TYPE', 'Membr'], ['TH', '.092']], 'BISON': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.0002']], 'S200RA': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.2']], 'W750': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.75']], 'PLANK1': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.25']], 'W800': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.8']], 'W350': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.35']], 'S130': [['MAT', 'CONC'], ['TYPE', 'Shell,Thin'], ['TH', '.13']], 'DECK1': [['MAT', 'CONC'], ['TYPE', 'Membr'], ['TH', '.0889']]}

I am working on it.

Ning

This is because of the structure of your dictionnary : as you use something like
dic={KEY1:[[key1, val1], [key2, val2]], KEY2:[...]}
I used something like
dic={KEY1:{key1:val1, key2:val2},KEY2:{...}}
(look carefully my first post about that)

The way you built your dictionnary is certainly not very far from the way you can build mine.
But, in this case, mine is much easier to use because 'IDES', 'T,' 'E'... are keys and not only the first element of a list so you can do
value=dic[KEY1][key2]

``````for element in dic[KEY1]:
if element[0]==key2:
value=element[1]
break``````

If you need it, here are your dictionaries translated (vim powa)

``````Material_dic: {'STEEL': {'IDES':'S', 'W':'76819.41', 'T':'0', 'E':'1.99948E+11', 'U':'.3', 'A':'.0000117', 'FY':'3.447379E+08'}, 'S335': {'IDES':'S', 'W':'78500.3', 'T':'0', 'E':'2.05E+11', 'U':'.3', 'A':'.0000117', 'FY':'3.35E+08'}, 'OTHER': {'IDES':'N', 'W':'76819.55', 'T':'0', 'E':'1.99948E+11', 'U':'.3', 'A':'.0000117'}, 'S345': {'IDES':'S', 'W':'78500.3', 'T':'0', 'E':'2.05E+11', 'U':'.3', 'A':'.0000117', 'FY':'3.45E+08'}, 'S355': {'IDES':'S', 'W':'78500.27', 'T':'0', 'E':'2.05E+11', 'U':'.3', 'A':'.0000117', 'FY':'3.557E+08'}, 'GLASS': {'IDES':'C', 'W':'26000', 'T':'0', 'E':'7.2E+10', 'U':'.235', 'A':'.000008'}, 'CONC': {'IDES':'C', 'W':'23561.61', 'T':'0', 'E':'2.482113E+10', 'U':'.2', 'A':'.0000099'}, 'S325': {'IDES':'S', 'W':'78500.3', 'T':'0', 'E':'2.05E+11', 'U':'.3', 'A':'.0000117', 'FY':'3.25E+08'}, 'MAC520': {'IDES':'S', 'W':'76820', 'T':'0', 'E':'2.482113E+10', 'U':'.3', 'A':'.0000117', 'FY':'5.2E+08'}, 'LWC': {'IDES':'C', 'W':'19000', 'T':'0', 'E':'2.482E+10', 'U':'.2', 'A':'.0000099'}}

Frame_Section_dic: {'LCHS610-25-4': {'MAT':'S355', 'SH':'P', 'T':'.61,.0254'}, 'F500X250X10X17': {'MAT':'S355', 'SH':'I', 'T':'.5,.25,.017,.01,.25,.017'}, 'F500X250X10X15': {'MAT':'S355', 'SH':'I', 'T':'.5,.25,.015,.01,.25,.015'}, '356X406X551UCWITH80PLATES': {'MAT':'S325', 'SH':'B', 'T':'.4556,.5785,.0675,.08'}, 'UC356X368X129': {'MAT':'STEEL', 'A':'.0164', 'J':'1.53E-06', 'I':'.0004025,.0001461', 'AS':'3.69824E-03,1.075083E-02', 'S':'2.26378E-03,7.927293E-04', 'Z':'.00248,.0012', 'R':'.156661,9.438504E-02', 'T':'.3556,.3686,.0175,.0104,.3686,.0175', 'SHN':'UC356X368X129', 'DSG':'W'}, 'UB305X165X46': {'MAT':'STEEL', 'A':'.00587', 'J':'2.22E-07', 'I':'9.899E-05,8.96E-06', 'AS':'2.05422E-03,3.258767E-03', 'S':'6.457273E-04,1.081473E-04', 'Z':'.00072,.000166', 'R':'.1298604,3.906924E-02', 'T':'.3066,.1657,.0118,.0067,.1657,.0118', 'SHN':'UB305X165X46', 'DSG':'W'}, 'UB305X165X40': {'MAT':'STEEL', 'A':'.00513', 'J':'1.47E-07', 'I':'8.503E-05,7.64E-06', 'AS':'.0018204,.002805', 'S':'5.605142E-04,9.260606E-05', 'Z':'.000623,.000142', 'R':'.1287441,3.859118E-02', 'T':'.3034,.165,.0102,.006,.165,.0102', 'SHN':'UB305X165X40', 'DSG':'W'}, 'LCHS965-22-2': {'MAT':'S355', 'SH':'P', 'T':'.965,.0222'}, 'LCHS914-32': {'MAT':'S355', 'SH':'P', 'T':'.914,.032'}, 'UC356X406X340': {'MAT':'STEEL', 'A':'.0433', 'J':'2.343E-05', 'I':'.001225,.0004685', 'AS':'1.081024E-02,.0288145', 'S':'6.028544E-03,2.325062E-03', 'Z':'.007,.00354', 'R':'.1681993,.1040186', 'T':'.4064,.403,.0429,.0266,.403,.0429', 'SHN':'UC356X406X340', 'DSG':'W'}, 'UC254X254X107': {'MAT':'STEEL', 'A':'.0136', 'J':'1.72E-06', 'I':'.0001751,5.928E-05', 'AS':'3.41376E-03,8.842333E-03', 'S':'1.313086E-03,4.581144E-04', 'Z':'.00148,.000697', 'R':'.1134681,6.602139E-02', 'T':'.2667,.2588,.0205,.0128,.2588,.0205', 'SHN':'UC254X254X107', 'DSG':'W'}, 'UB254X146X37': {'MAT':'STEEL', 'A':'.00472', 'J':'1.53E-07', 'I':'5.537E-05,5.71E-06', 'AS':'.0016128,.0026596', 'S':'4.325781E-04,7.800547E-05', 'Z':'.000483,.000119', 'R':'.1083094,.0347814', 'T':'.256,.1464,.0109,.0063,.1464,.0109', 'SHN':'UB254X146X37', 'DSG':'W'}, 'F500X220X10X15': {'MAT':'S355', 'SH':'I', 'T':'.5,.22,.015,.01,.22,.015'}, 'T': {'MAT':'STEEL', 'SH':'I', 'T':'.18,.01,.01,.008,.2,.01'}, 'UC305X305X118': {'MAT':'STEEL', 'A':'.015', 'J':'1.61E-06', 'I':'.0002767,9.059E-05', 'AS':'.003774,9.580634E-03', 'S':'1.759618E-03,5.893949E-04', 'Z':'.00196,.000895', 'R':'.1358185,7.771315E-02', 'T':'.3145,.3074,.0187,.012,.3074,.0187', 'SHN':'UC305X305X118', 'DSG':'W'}, 'UC305X305X198': {'MAT':'STEEL', 'A':'.0252', 'J':'7.34E-06', 'I':'.000509,.000163', 'AS':'6.49209E-03,1.645883E-02', 'S':'2.994999E-03,1.036566E-03', 'Z':'.00344,.00158', 'R':'.1421211,8.042546E-02', 'T':'.3399,.3145,.0314,.0191,.3145,.0314', 'SHN':'UC305X305X198', 'DSG':'W'}, 'LCHS813-15-9': {'MAT':'S355', 'SH':'P', 'T':'.813,.0159'}, 'CS300X100X46': {'MAT':'S355', 'SH':'C', 'T':'.3,.1,.0165,.009'}, 'UC356X406X467': {'MAT':'STEEL', 'A':'.0595', 'J':'5.809E-05', 'I':'.00183,.0006783', 'AS':'1.563028E-02,.039846', 'S':'8.382958E-03,3.291121E-03', 'Z':'.01,.00503', 'R':'.1753747,.1067708', 'T':'.4366,.4122,.058,.0358,.4122,.058', 'SHN':'UC356X406X467', 'DSG':'W'}, 'FAB50': {'MAT':'S355', 'SH':'I', 'T':'.5,.16,.015,.012,.16,.015'}, 'F500X160X10X10': {'MAT':'S355', 'SH':'I', 'T':'.5,.16,.01,.01,.16,.01'}, 'F500X160X10X12': {'MAT':'S355', 'SH':'I', 'T':'.5,.16,.012,.01,.16,.012'}, 'UB305X102X25': {'MAT':'STEEL', 'A':'.00316', 'J':'4.77E-08', 'I':'4.455E-05,1.23E-06', 'AS':'1.76958E-03,1.185333E-03', 'S':'2.920354E-04,2.42126E-05', 'Z':'.000342,.0000388', 'R':'.1187354,1.972918E-02', 'T':'.3051,.1016,.007,.0058,.1016,.007', 'SHN':'UB305X102X25', 'DSG':'W'}, '356X406X467UCWITH50PLATES': {'MAT':'S335', 'SH':'B', 'T':'.4366,.5122,.058,.05'}, 'UB305X102X28': {'MAT':'STEEL', 'A':'.00359', 'J':'7.4E-08', 'I':'5.366E-05,1.55E-06', 'AS':'.0018522,1.493067E-03', 'S':'3.476514E-04,3.045187E-05', 'Z':'.000403,.0000485', 'R':'.1222582,2.077871E-02', 'T':'.3087,.1018,.0088,.006,.1018,.0088', 'SHN':'UB305X102X28', 'DSG':'W'}, '356X406X393UCWITH50PLATES': {'MAT':'S335', 'SH':'B', 'T':'.419,.507,.0492,.05'}, 'UB305X127X37': {'MAT':'STEEL', 'A':'.00472', 'J':'1.48E-07', 'I':'7.171E-05,3.36E-06', 'AS':'2.16124E-03,2.200633E-03', 'S':'4.711564E-04,5.445705E-05', 'Z':'.000539,.0000854', 'R':'.1232591,2.668079E-02', 'T':'.3044,.1234,.0107,.0071,.1234,.0107', 'SHN':'UB305X127X37', 'DSG':'W'}, 'FAB115': {'MAT':'S355', 'SH':'I', 'T':'.5,.4,.03,.03,.4,.03'}, 'UC254X254X73': {'MAT':'STEEL', 'A':'.00931', 'J':'5.76E-07', 'I':'.0001141,3.908E-05', 'AS':'2.18526E-03,6.025533E-03', 'S':'8.980716E-04,3.069914E-04', 'Z':'.000992,.000465', 'R':'.1107052,6.478918E-02', 'T':'.2541,.2546,.0142,.0086,.2546,.0142', 'SHN':'UC254X254X73', 'DSG':'W'}, '750X750X60JUMBOBOX': {'MAT':'S335', 'SH':'B', 'T':'.75,.75,.06,.06'}, 'LCHS660-27': {'MAT':'S355', 'SH':'P', 'T':'.66,.027'}, 'UC305X305X97': {'MAT':'STEEL', 'A':'.0123', 'J':'9.12E-07', 'I':'.0002225,7.308E-05', 'AS':'3.04821E-03,7.836033E-03', 'S':'1.445275E-03,4.787422E-04', 'Z':'.00159,.000726', 'R':'.134497,7.708089E-02', 'T':'.3079,.3053,.0154,.0099,.3053,.0154', 'SHN':'UC305X305X97', 'DSG':'W'}, 'UB356X171X51': {'MAT':'STEEL', 'A':'.00649', 'J':'2.38E-07', 'I':'.0001414,9.68E-06', 'AS':'.002627,3.287083E-03', 'S':'7.966196E-04,1.128863E-04', 'Z':'.000896,.000174', 'R':'.1476054,3.862027E-02', 'T':'.355,.1715,.0115,.0074,.1715,.0115', 'SHN':'UB356X171X51', 'DSG':'W'}, 'LCHS1067-23-8': {'MAT':'S355', 'SH':'P', 'T':'1.067,.0238'}, 'UB305X102X33': {'MAT':'STEEL', 'A':'.00418', 'J':'1.22E-07', 'I':'6.501E-05,1.94E-06', 'AS':'2.06382E-03,.0018432', 'S':'4.157979E-04,3.789063E-05', 'Z':'.000481,.00006', 'R':'.1247102,2.154332E-02', 'T':'.3127,.1024,.0108,.0066,.1024,.0108', 'SHN':'UB305X102X33', 'DSG':'W'}, '600X400X32JUMBORHS': {'MAT':'S345', 'SH':'B', 'T':'.4,.6,.032,.032'}, 'UC203X203X46': {'MAT':'STEEL', 'A':'.00587', 'J':'2.22E-07', 'I':'4.568E-05,1.548E-05', 'AS':'1.46304E-03,3.732667E-03', 'S':'4.496063E-04,1.520629E-04', 'Z':'.000497,.000231', 'R':'8.821531E-02,5.135307E-02', 'T':'.2032,.2036,.011,.0072,.2036,.011', 'SHN':'UC203X203X46', 'DSG':'W'}, 'EA120X120X15': {'MAT':'STEEL', 'A':'.0034', 'J':'2.7E-07', 'I':'4.48E-06,4.48E-06', 'AS':'.0018,.0018', 'S':'7.466667E-05,7.466667E-05', 'Z':'9.608333E-05,9.608333E-05', 'R':'3.629941E-02,3.629941E-02', 'T':'.12,.12,.015,.015,0,0', 'SHN':'EA120X120X15', 'DSG':'L'}, 'SHS100-5': {'MAT':'S355', 'SH':'B', 'T':'.1,.1,.005,.005'}, '356X406X634UCWITH80PLATES': {'MAT':'S325', 'SH':'B', 'T':'.4746,.584,.077,.08'}, 'LCHS762-28-6': {'MAT':'S355', 'SH':'P', 'T':'.762,.0286'}, 'F500X280X15X17': {'MAT':'S355', 'SH':'I', 'T':'.5,.28,.017,.015,.28,.017'}, 'LCHS1016-15-9': {'MAT':'S355', 'SH':'P', 'T':'1.016,.0159'}, 'FAB125': {'MAT':'S355', 'SH':'I', 'T':'.5,.2,.02,.015,.2,.02'}, 'LCHS1016-23-8': {'MAT':'S355', 'SH':'P', 'T':'1.016,.0238'}, 'CHS273-10': {'MAT':'S355', 'SH':'P', 'T':'.273,.01'}, 'UC356X368X177': {'MAT':'STEEL', 'A':'.0226', 'J':'3.81E-06', 'I':'.0005712,.0002053', 'AS':'5.30208E-03,.0147798', 'S':'3.102662E-03,1.101986E-03', 'Z':'.00346,.00167', 'R':'.158979,9.531039E-02', 'T':'.3682,.3726,.0238,.0144,.3726,.0238', 'SHN':'UC356X368X177', 'DSG':'W'}, 'UB203X102X23': {'MAT':'STEEL', 'A':'.00294', 'J':'7.02E-08', 'I':'2.105E-05,1.64E-06', 'AS':'1.09728E-03,.0015779', 'S':'2.07185E-04,3.222004E-05', 'Z':'.000234,.0000498', 'R':'8.461598E-02,2.361828E-02', 'T':'.2032,.1018,.0093,.0054,.1018,.0093', 'SHN':'UB203X102X23', 'DSG':'W'}, 'UB356X127X39': {'MAT':'STEEL', 'A':'.00498', 'J':'1.51E-07', 'I':'.0001017,3.58E-06', 'AS':'2.33244E-03,.002247', 'S':'5.755518E-04,5.68254E-05', 'Z':'.000659,.0000891', 'R':'.1429045,2.681185E-02', 'T':'.3534,.126,.0107,.0066,.126,.0107', 'SHN':'UB356X127X39', 'DSG':'W'}, 'UC203X203X52': {'MAT':'STEEL', 'A':'.00663', 'J':'3.18E-07', 'I':'5.259E-05,1.778E-05', 'AS':'1.62898E-03,4.25625E-03', 'S':'5.100873E-04,1.740578E-04', 'Z':'.000567,.000264', 'R':'8.906249E-02,5.178561E-02', 'T':'.2062,.2043,.0125,7.900001E-03,.2043,.0125', 'SHN':'UC203X203X52', 'DSG':'W'}, 'F500X200X10X15': {'MAT':'S355', 'SH':'I', 'T':'.5,.2,.015,.01,.2,.015'}, 'LB500': {'MAT':'CONC', 'SH':'R', 'T':'.7,.5'}, 'UC356X406X393': {'MAT':'STEEL', 'A':'.0501', 'J':'3.545E-05', 'I':'.001466,.0005537', 'AS':'.0128214,.033374', 'S':'6.997613E-03,2.720885E-03', 'Z':'.00822,.00415', 'R':'.1710599,.105128', 'T':'.419,.407,.0492,.0306,.407,.0492', 'SHN':'UC356X406X393', 'DSG':'W'}, 'F500X280X10X17': {'MAT':'S355', 'SH':'I', 'T':'.5,.28,.017,.01,.28,.017'}, 'UB203X133X25': {'MAT':'STEEL', 'A':'.0032', 'J':'5.96E-08', 'I':'.0000234,3.08E-06', 'AS':'1.15824E-03,.0017316', 'S':'2.30315E-04,4.624625E-05', 'Z':'.000258,.0000709', 'R':'8.551316E-02,3.102418E-02', 'T':'.2032,.1332,.0078,.0057,.1332,.0078', 'SHN':'UB203X133X25', 'DSG':'W'}, 'LCHS914-22-2': {'MAT':'S355', 'SH':'P', 'T':'.914,.0222'}, 'LCHS508-11-9': {'MAT':'S355', 'SH':'P', 'T':'.508,.0119'}, 'F500X320X20X25': {'MAT':'S355', 'SH':'I', 'T':'.5,.32,.025,.02,.32,.025'}, 'F101D': {'MAT':'S355', 'SH':'I', 'T':'.5,.15,.015,.012,.15,.015'}, 'UB356X171X45': {'MAT':'STEEL', 'A':'.00573', 'J':'1.58E-07', 'I':'.0001207,8.11E-06', 'AS':'.0024598,2.766117E-03', 'S':'6.869664E-04,9.479836E-05', 'Z':'.000775,.000147', 'R':'.1451364,3.762124E-02', 'T':'.3514,.1711,9.699999E-03,.007,.1711,9.699999E-03', 'SHN':'UB356X171X45', 'DSG':'W'}, 'UC356X406X551': {'MAT':'STEEL', 'A':'.0702', 'J':'.0000924', 'I':'.002269,.0008267', 'AS':'1.918076E-02,4.708125E-02', 'S':'9.960491E-03,3.950777E-03', 'Z':'.0121,.00606', 'R':'.179783,.1085189', 'T':'.4556,.4185,.0675,.0421,.4185,.0675', 'SHN':'UC356X406X551', 'DSG':'W'}, 'CHS193-7-8': {'MAT':'S355', 'SH':'P', 'T':'.1937,.008'}, 'LB500X1200': {'MAT':'CONC', 'SH':'R', 'T':'1.2,.5'}, 'UC356X406X634': {'MAT':'STEEL', 'A':'.0808', 'J':'.0001372', 'I':'.002748,9.813001E-04', 'AS':'2.259096E-02,5.441333E-02', 'S':'1.158028E-02,4.628774E-03', 'Z':'.0142,.00711', 'R':'.1844177,.1102035', 'T':'.4746,.424,.077,.0476,.424,.077', 'SHN':'UC356X406X634', 'DSG':'W'}, 'UB254X102X25': {'MAT':'STEEL', 'A':'.0032', 'J':'6.42E-08', 'I':'3.415001E-05,1.49E-06', 'AS':'.0015432,.0014266', 'S':'2.655521E-04,2.924436E-05', 'Z':'.000306,.000046', 'R':'.1033048,2.157835E-02', 'T':'.2572,.1019,.0084,.006,.1019,.0084', 'SHN':'UB254X102X25', 'DSG':'W'}, 'UC203X203X60': {'MAT':'STEEL', 'A':'.00764', 'J':'4.72E-07', 'I':'6.125E-05,2.065E-05', 'AS':'1.97024E-03,.0048706', 'S':'5.844465E-04,2.006803E-04', 'Z':'.000656,.000305', 'R':'8.953779E-02,5.198922E-02', 'T':'.2096,.2058,.0142,.0094,.2058,.0142', 'SHN':'UC203X203X60', 'DSG':'W'}, 'F500X200X10X20': {'MAT':'S355', 'SH':'I', 'T':'.5,.2,.02,.01,.2,.02'}, 'F500X200X10X22': {'MAT':'S355', 'SH':'I', 'T':'.5,.2,.022,.01,.2,.022'}, 'UB254X102X22': {'MAT':'STEEL', 'A':'.0028', 'J':'4.15E-08', 'I':'2.841E-05,1.19E-06', 'AS':'.0014478,1.151467E-03', 'S':'2.237008E-04,2.34252E-05', 'Z':'.000259,.0000373', 'R':'.1007295,2.061553E-02', 'T':'.254,.1016,.0068,.0057,.1016,.0068', 'SHN':'UB254X102X22', 'DSG':'W'}, 'UC305X305X283': {'MAT':'STEEL', 'A':'.036', 'J':'2.034E-05', 'I':'.0007887,.0002463', 'AS':'9.790039E-03,.0236817', 'S':'4.318095E-03,1.528864E-03', 'Z':'.00511,.00234', 'R':'.1480146,8.271437E-02', 'T':'.3653,.3222,.0441,.0268,.3222,.0441', 'SHN':'UC305X305X283', 'DSG':'W'}, 'UB305X127X48': {'MAT':'STEEL', 'A':'.00612', 'J':'3.18E-07', 'I':'9.575E-05,4.61E-06', 'AS':'.002799,2.923667E-03', 'S':'6.157556E-04,7.35834E-05', 'Z':'.000711,.000116', 'R':'.1250817,2.744573E-02', 'T':'.311,.1253,.014,.009,.1253,.014', 'SHN':'UB305X127X48', 'DSG':'W'}, 'UC305X305X158': {'MAT':'STEEL', 'A':'.0201', 'J':'3.78E-06', 'I':'.0003875,.0001257', 'AS':'5.16818E-03,1.296667E-02', 'S':'2.369306E-03,8.078406E-04', 'Z':'.00268,.00123', 'R':'.1388474,7.908054E-02', 'T':'.3271,.3112,.025,.0158,.3112,.025', 'SHN':'UC305X305X158', 'DSG':'W'}, 'F500X340X20X20': {'MAT':'S355', 'SH':'I', 'T':'.5,.34,.02,.02,.34,.02'}, 'UB356X171X57': {'MAT':'STEEL', 'A':'.00726', 'J':'3.34E-07', 'I':'.0001604,1.108E-05', 'AS':'.0028998,.003731', 'S':'8.960894E-04,1.286876E-04', 'Z':'.00101,.000199', 'R':'.1486394,3.906624E-02', 'T':'.358,.1722,.013,.0081,.1722,.013', 'SHN':'UB356X171X57', 'DSG':'W'}, 'UC356X368X202': {'MAT':'STEEL', 'A':'.0257', 'J':'5.58E-06', 'I':'.0006626,.0002369', 'AS':'.0061809,.0168615', 'S':'3.53764E-03,1.264478E-03', 'Z':'.00397,.00192', 'R':'.1605681,9.600989E-02', 'T':'.3746,.3747,.027,.0165,.3747,.027', 'SHN':'UC356X368X202', 'DSG':'W'}, 'F500X340X20X28': {'MAT':'S355', 'SH':'I', 'T':'.5,.34,.028,.02,.34,.028'}, 'UC356X406X235': {'MAT':'STEEL', 'A':'.0299', 'J':'8.12E-06', 'I':'.0007908,.0003099', 'AS':'.0070104,.0198716', 'S':'4.151181E-03,1.569909E-03', 'Z':'.00469,.00238', 'R':'.1626289,.1018064', 'T':'.381,.3948,.0302,.0184,.3948,.0302', 'SHN':'UC356X406X235', 'DSG':'W'}, 'FABDUMMYTWINBEAMS': {'MAT':'S355', 'SH':'I', 'T':'.5,.35,.05,.025,.35,.05'}, 'UC203X203X71': {'MAT':'STEEL', 'A':'.00904', 'J':'8.02E-07', 'I':'7.618E-05,2.537E-05', 'AS':'.002158,.0059512', 'S':'7.060241E-04,2.458333E-04', 'Z':'.000799,.000374', 'R':'9.179865E-02,5.297562E-02', 'T':'.2158,.2064,.0173,.01,.2064,.0173', 'SHN':'UC203X203X71', 'DSG':'W'}, 'LCHS711-27': {'MAT':'S355', 'SH':'P', 'T':'.711,.027'}, 'LCHS864-15-9': {'MAT':'S355', 'SH':'P', 'T':'.864,.0159'}, 'LCHS559-15-9': {'MAT':'S355', 'SH':'P', 'T':'.559,.0159'}, 'F500X280X15X20': {'MAT':'S355', 'SH':'I', 'T':'.5,.28,.02,.015,.28,.02'}, 'UC356X406X287': {'MAT':'STEEL', 'A':'.0366', 'J':'1.441E-05', 'I':'.0009988,.0003868', 'AS':'8.895359E-03,.0242725', 'S':'5.075203E-03,1.938847E-03', 'Z':'.00581,.00295', 'R':'.1651957,.1028023', 'T':'.3936,.399,.0365,.0226,.399,.0365', 'SHN':'UC356X406X287', 'DSG':'W'}, 'UB356X171X67': {'MAT':'STEEL', 'A':'.00855', 'J':'5.57E-07', 'I':'.0001946,1.362E-05', 'AS':'3.30694E-03,4.532066E-03', 'S':'1.070996E-03,1.572748E-04', 'Z':'.00121,.000243', 'R':'.150865,3.991218E-02', 'T':'.3634,.1732,.0157,.0091,.1732,.0157', 'SHN':'UB356X171X67', 'DSG':'W'}, 'LCHS1067-15-9': {'MAT':'S355', 'SH':'P', 'T':'1.067,.0159'}, 'UB254X146X31': {'MAT':'STEEL', 'A':'.00397', 'J':'8.55E-08', 'I':'4.413E-05,4.48E-06', 'AS':'.0015084,.0020941', 'S':'3.51074E-04,6.132785E-05', 'Z':'.000393,.0000941', 'R':'.1054318,3.359261E-02', 'T':'.2514,.1461,.0086,.006,.1461,.0086', 'SHN':'UB254X146X31', 'DSG':'W'}, 'LCHS1016-32': {'MAT':'S355', 'SH':'P', 'T':'1.016,.032'}, 'CHS139-7-8': {'MAT':'S355', 'SH':'P', 'T':'.1397,.008'}, 'UB356X127X33': {'MAT':'STEEL', 'A':'.00421', 'J':'8.79E-08', 'I':'8.248999E-05,.0000028', 'AS':'.002094,.0017765', 'S':'4.72722E-04,4.46571E-05', 'Z':'.000543,.0000703', 'R':'.1399779,.0257892', 'T':'.349,.1254,.0085,.006,.1254,.0085', 'SHN':'UB356X127X33', 'DSG':'W'}, 'UC305X305X137': {'MAT':'STEEL', 'A':'.0174', 'J':'2.49E-06', 'I':'.0003281,.000107', 'AS':'.0044229,1.118273E-02', 'S':'2.047426E-03,6.921087E-04', 'Z':'.0023,.00105', 'R':'.1373183,7.841828E-02', 'T':'.3205,.3092,.0217,.0138,.3092,.0217', 'SHN':'UC305X305X137', 'DSG':'W'}, '800X800X60JUMBOBOX': {'MAT':'S335', 'SH':'B', 'T':'.8,.8,.06,.06'}, 'F500X420X25X35': {'MAT':'STEEL', 'SH':'I', 'T':'.5,.42,.035,.025,.42,.035'}, 'LCHS813-28-6': {'MAT':'S355', 'SH':'P', 'T':'.813,.0286'}, 'LCHS965-14-3': {'MAT':'S355', 'SH':'P', 'T':'.965,.0143'}, 'F500X300X10X20': {'MAT':'S355', 'SH':'I', 'T':'.5,.3,.02,.01,.3,.02'}, 'UB203X133X30': {'MAT':'STEEL', 'A':'.00382', 'J':'1.03E-07', 'I':'2.896E-05,3.85E-06', 'AS':'1.32352E-03,.0021424', 'S':'2.800774E-04,5.75056E-05', 'Z':'.000314,.0000882', 'R':'8.706981E-02,3.174671E-02', 'T':'.2068,.1339,.0096,.0064,.1339,.0096', 'SHN':'UB203X133X30', 'DSG':'W'}, 'F500X350X20X35': {'MAT':'S355', 'SH':'I', 'T':'.5,.35,.035,.02,.35,.035'}, 'F500X300X10X25': {'MAT':'S355', 'SH':'I', 'T':'.5,.3,.025,.01,.3,.025'}, 'UB305X165X54': {'MAT':'STEEL', 'A':'.00688', 'J':'3.48E-07', 'I':'.000117,1.063E-05', 'AS':'2.45216E-03,3.810883E-03', 'S':'7.53866E-04,1.273817E-04', 'Z':'.000846,.000196', 'R':'.1304063,3.930723E-02', 'T':'.3104,.1669,.0137,7.900001E-03,.1669,.0137', 'SHN':'UB305X165X54', 'DSG':'W'}, 'UC356X368X153': {'MAT':'STEEL', 'A':'.0195', 'J':'2.51E-06', 'I':'.0004859,.0001755', 'AS':'.0044526,1.278225E-02', 'S':'2.684531E-03,9.473684E-04', 'Z':'.00297,.00144', 'R':'.1578542,9.486833E-02', 'T':'.362,.3705,.0207,.0123,.3705,.0207', 'SHN':'UC356X368X153', 'DSG':'W'}}

Shell_Section_dic: {'FS450': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.45'}, 'S200': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.2'}, 'MEISER': {'MAT':'STEEL', 'TYPE':'Membr', 'TH':'.05', 'THB':'.001'}, '130SLAB': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.32'}, 'WALL1': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.25'}, 'W500': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.5'}, 'LWC130': {'MAT':'LWC', 'TYPE':'Membr', 'TH':'.13'}, 'W400': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.4'}, 'P130': {'MAT':'CONC', 'TYPE':'Plate,Thin', 'TH':'.13'}, 'SAPSLAB': {'MAT':'LWC', 'TYPE':'Shell,Thin', 'TH':'.13'}, 'S320': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.32'}, 'D130': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.115'}, 'SLAB1': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.25'}, 'W300': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.3'}, 'S130RA': {'MAT':'LWC', 'TYPE':'Membr', 'TH':'.13'}, 'W450': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.45'}, 'S250': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.25'}, 'W200': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.2'}, 'LUXCRETE': {'MAT':'S345', 'TYPE':'Membr', 'TH':'.092'}, 'BISON': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.0002'}, 'S200RA': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.2'}, 'W750': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.75'}, 'PLANK1': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.25'}, 'W800': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.8'}, 'W350': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.35'}, 'S130': {'MAT':'CONC', 'TYPE':'Shell,Thin', 'TH':'.13'}, 'DECK1': {'MAT':'CONC', 'TYPE':'Membr', 'TH':'.0889'}}``````

Hi, Jice

I have not modified my code yet as I am reading a book called "Learning Python" due to the error I made. I will come back after my Easter break.

Have a nice Easter.

all the best

ning

Here are some clues to make a dictionary :

For example, your append_rec_list function :

``````def append_rec_list(rec_in, return_dic, key):
conditions = rec_in.split()
for each_c in conditions:
sub_conditions = each_c.split("=")  ## a list with 2 elements
return_dic[key].append(sub_conditions)
return return_dic``````

will become

``````def append_rec_list(rec_in, return_dic, key):
conditions = rec_in.split()
for each_c in conditions:
sub_conditions = each_c.split("=")  ## a list with 2 elements
if len(sub_conditions)==2:
return_dic[key].update({sub_conditions[0]:sub_conditions[1]})
elif len(sub_conditions)==1: # if you need this...
return_dic[key].update({"idx":sub_conditions[0]})
return return_dic``````

and

``````def new_rec_list(rec_in, dic_return):
conditions = rec_in.split()
name, key = conditions[0].split("=")   ## split first one only
dic_return[key]= []                     ## empty list

##   process element #2 through the end of the list
stop = len(conditions)
for num in range(1, stop):
sub_conditions = conditions[num].split("=")  ## a list with 2 elements
dic_return[key].append(sub_conditions)
return dic_return, key``````

will become

``````def new_rec_list(rec_in, dic_return):
conditions = rec_in.split()
name, key = conditions[0].split("=")   ## split first one only
dic_return[key]= {}                     ## empty dictionary

stop = len(conditions)
for num in range(1, stop):
sub_conditions = conditions[num].split("=")  ## a list with 2 elements
dic_return[key].update(dict([conditions[num]])) # another way to make the dictionary... But you can do as in the append function
return dic_return, key``````

This haven't been tested as I don't have any file to process and i don't want to build one :)

Hi, jice

1) you modified type of dic_return[key] from list to dicts;
2) you replaced list methd append() with dicts method update().

After adapting your code, I encountered the error: "ValueError: dictionary update sequence element #0 has length 6; 2 is required"
on code line 9 "dic_return[key].update(dict([conditions[num]]))".

In case you might need my data file, let me put here as well

NAME=STEEL IDES=S W=76819.41
T=0 E=1.99948E+11 U=.3 A=.0000117 FY=3.447379E+08
NAME=CONC IDES=C W=23561.61
T=0 E=2.482113E+10 U=.2 A=.0000099
NAME=OTHER IDES=N W=76819.55
T=0 E=1.99948E+11 U=.3 A=.0000117
NAME=S355 IDES=S W=78500.27
T=0 E=2.05E+11 U=.3 A=.0000117 FY=3.557E+08
NAME=MAC520 IDES=S W=76820
T=0 E=2.482113E+10 U=.3 A=.0000117 FY=5.2E+08
NAME=LWC IDES=C W=19000
T=0 E=2.482E+10 U=.2 A=.0000099
NAME=S345 IDES=S W=78500.3
T=0 E=2.05E+11 U=.3 A=.0000117 FY=3.45E+08
NAME=S335 IDES=S W=78500.3
T=0 E=2.05E+11 U=.3 A=.0000117 FY=3.35E+08
NAME=S325 IDES=S W=78500.3
T=0 E=2.05E+11 U=.3 A=.0000117 FY=3.25E+08
NAME=GLASS IDES=C W=26000
T=0 E=7.2E+10 U=.235 A=.000008

NAME=W500 MAT=CONC TYPE=Shell,Thin TH=.5
NAME=W300 MAT=CONC TYPE=Shell,Thin TH=.3
NAME=W200 MAT=CONC TYPE=Shell,Thin TH=.2
NAME=W450 MAT=CONC TYPE=Shell,Thin TH=.45
NAME=S320 MAT=CONC TYPE=Membr TH=.32
NAME=LWC130 MAT=LWC TYPE=Membr TH=.13
NAME=W400 MAT=CONC TYPE=Shell,Thin TH=.4
NAME=W800 MAT=CONC TYPE=Shell,Thin TH=.8
NAME=W350 MAT=CONC TYPE=Shell,Thin TH=.35
NAME=W750 MAT=CONC TYPE=Shell,Thin TH=.75
NAME=WALL1 MAT=CONC TYPE=Shell,Thin TH=.25
NAME=SLAB1 MAT=CONC TYPE=Shell,Thin TH=.25
NAME=DECK1 MAT=CONC TYPE=Membr TH=.0889
NAME=PLANK1 MAT=CONC TYPE=Membr TH=.25
NAME=S130 MAT=CONC TYPE=Shell,Thin TH=.13
NAME=S130RA MAT=LWC TYPE=Membr TH=.13
NAME=P130 MAT=CONC TYPE=Plate,Thin TH=.13
NAME=S200RA MAT=CONC TYPE=Membr TH=.2
NAME=FS450 MAT=CONC TYPE=Shell,Thin TH=.45
NAME=D130 MAT=CONC TYPE=Membr TH=.115
NAME=130SLAB MAT=CONC TYPE=Membr TH=.32
NAME=MEISER MAT=STEEL TYPE=Membr TH=.05 THB=.001
NAME=LUXCRETE MAT=S345 TYPE=Membr TH=.092
NAME=BISON MAT=CONC TYPE=Membr TH=.0002
NAME=S250 MAT=CONC TYPE=Membr TH=.25
NAME=S200 MAT=CONC TYPE=Membr TH=.2
NAME=SAPSLAB MAT=LWC TYPE=Shell,Thin TH=.13

Thank you and have a nice day

best wishes

ning

OUPS

``````def new_rec_list(rec_in, dic_return):
conditions = rec_in.split()
name, key = conditions[0].split("=")   ## split first one only
dic_return[key]= {}                     ## empty dictionary

stop = len(conditions)
for num in range(1, stop):
sub_conditions = conditions[num].split("=")  ## a list with 2 elements
# dic_return[key].update(dict([conditions[num]]))
dic_return[key].update(dict([sub_conditions])) # another way
return dic_return, key``````

This should be better

Hi, Jice

It works pretty well. Thank you so much. Eventually I started to use Python to achieve something without your endless help.

all the best

ning

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.