I can see the loadcases information in CDB information , but can I get them as list?
Anyone help me how to loop through all the LCs and get beam forces for each LC? When I used the below code I am getting only for first load case i.e 2125. I want for all the LCs in list.
ie = c_int(0)
beamForces = {'beam':[],'LC':[],'Grp':[], 'VZ':[], 'MY':[]}
LC = [2125,2126,2425,2426,2129,2130,2429,2430]
for lc in LC:
print(lc)
while ie.value < 2:
datalen.value = sizeof(CBEAM_FOC)
RecLen = c_int(sizeof(cbeam_foc))
ie.value = py_sof_cdb_get(Index, 102, lc, byref(cbeam_foc), byref(RecLen), 1)
beamForces['beam'].append(cbeam_foc.m_id)
beamForces['VZ'].append(cbeam_foc.m_vz)
beamForces['MY'].append(cbeam_foc.m_my)
beamForces['LC'].append(lc)
# Always read the length of record before sof_cdb_get is called
RecLen = c_int(sizeof(cbeam_foc))