How to correctly open multiple binout files using DPF-Core?

Options
marco.desiderio
marco.desiderio Member Posts: 1
edited June 11 in Structures

In LS-Dyna, different data is frequently stored in different binout files (binout0000, 0001, 0003..).
The very simple code:

def select_binout_files():
    file_paths = filedialog.askopenfilename(
        title="Select Files",
        filetypes=[("All files", "*.*")]
    )
    return file_paths


filepath = select_binout_files()
filepath = filepath.replace('/binout', '\\binout')
dsb = dpf.DataSources()
dsb.set_result_file_path(filepath, 'binout')
model = dpf.Model(dsb)
results = model.results

for attr in dir(results):
    if attr[0] != '_':
        print(attr)

should print all the attributes present in the results class. print(results) yields the correct list of expected results to be found in all the binouts, but, the for loop, instead, always prints the same, (usually glstat and a few others), but most of the other available results (print(results)) are not attributes of the class. What is the way to go?

Tagged:

Answers