How do I fetch Selection Information Data in Mechanical?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 419
5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member

How do I fetch Selection Information Data in Mechanical?

Comments

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 419
    5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member
    edited June 14
    Options

    You can use the following snippet to export data to a Text file and then parse it to load data in your Python session.

    cmd = '''DS.Script.exportDataToFileSelectionInfoPane("D:\\\\test.txt");''' 
    
    ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(cmd)