How to get current design-point folder from WB scripting console?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 389
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How to get current design-point folder from WB scripting console?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 389
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    import os
    result_files = filter(lambda x: ("ds.dat" in x), GetAllFiles())
    all_design_point_paths = list(set([os.path.dirname(result_file) for result_file in result_files]))
    current_dp_name = Parameters.GetCurrentDesignPoint().DisplayText.replace(" ", "").lower()
    current_dp_path = filter(lambda x: (current_dp_name  in x), all_design_point_paths)