How do I fetch Selection Information Data in Mechanical?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 454
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭

How do I fetch Selection Information Data in Mechanical?

Comments

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 454
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    edited June 14

    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)