Code to find all Subcases ids in Hyperview

Sagar Motwani_20540
Sagar Motwani_20540 Altair Community Member
edited October 2020 in Community Q&A

Can some would suggest me script for read and write all the subcase names and their respective ids, for now to get all subcases names, I am using-

hwi GetSessionHandle mySessionName

mySessionName GetDataFileHandle myDataFile $op2File
    
set subcase_list [myDataFile GetSubcaseList] 
puts 'subcase_list $subcase_list'

 

can some suggest script or code to find all Subcases ids with minimal changes in above.

Answers

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited April 2019

    Hi Sagar,

     

    You will have to follow the object hierarchy to reach subcases which is in ResultCtrl.

     

     hwi OpenStack      hwi GetSessionHandle session_handle      session_handle GetProjectHandle project_handle      project_handle GetPageHandle page_handle [project_handle GetActivePage]      page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]      window_handle GetClientHandle client_handle      client_handle GetModelHandle model_handle [client_handle GetActiveModel]      model_handle GetResultCtrlHandle result_handle      set lst_subcases [result_handle GetSubcaseList]  hwi CloseStack

     

  • Sagar Motwani_20540
    Sagar Motwani_20540 Altair Community Member
    edited April 2019

    Thanks Livil, 

    I am already getting Subcase Name List with my code, but facing problem in getting Subcase Id List