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

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
100 Answers 500 Comments 250 Likes First Anniversary
✭✭✭✭
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:

Best Answer

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    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)
    

Answers

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 214
    50 Answers 100 Comments 25 Likes Name Dropper
    ✭✭✭✭

    Sometimes this can lag a bit - the below seems a bit faster:

    solution.ReadGivenAnsysResultFileByReference()