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

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 452
100 Answers 250 Likes 100 Comments First Anniversary
✭✭✭✭
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: 452
    100 Answers 250 Likes 100 Comments First Anniversary
    ✭✭✭✭
    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)