How to Export Nastran File to a specific folder?

Erik Kostson
Erik Kostson Member, Moderator, Employee Posts: 276
50 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭
edited June 2023 in Structures

Using ACT scripting inside mechanical how can we export a Nastran file to a specific folder?

Answers

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 276
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    Below is a code that does that:

    from Ansys.ACT.Automation.Mechanical import NastranExportOptions
    
     
    
    nas = NastranExportOptions()
    nas.NastranFilename = r"C:\test.nas"
    
     
    
    ExtAPI.DataModel.AnalysisList[0].ExportNastranFile(nas)