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

marco.desiderio
marco.desiderio Member Posts: 2
First Comment
**
edited June 21 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, in the 'for' loop instead, most of the other available results (print(results)) are not attributes of the class. Glstat and others are present, but most putputs cannot be retrieved. What is the way to go?

Tagged:

Answers