Using ACT, how can I read a result file in Mechanical (similarly to Tools / Read result file) and sp

Options
Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

Using ACT, how can I read a result file in Mechanical (similarly to Tools / Read result file) and specify the unit system that was used for the solve?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

    The following line script can be used and adapted:

    Solu=ExtAPI.DataModel.Project.Model.Analyses[0].Solution 
    settings=ExtAPI.DataModel.Project.Model.Analyses[0].AnalysisSettings  
    sfd=settings.SolverFilesDirectory 
    Solu.ReadGivenAnsysResultFile(sfd+"file.rst", Ansys.ACT.Automation.Mechanical.Enums.UnitSystemIDType.UnitsMKS)  
    

    Depending on the version used, the last line can also be:

    Solu.ReadGivenAnsysResultFile(fName, UnitSystemIDType.UnitsUMKS)