When I'm using the reader in mechanical ACT, I've realized the file.rst get stuck and I cannot further operate with it after the first time I execute my code.
It's advisable to use the reader of the result within a "with" statement so is automatically disposed when its use is finished.
See the example below:
analysis = ExtAPI.DataModel.Project.Model.Analyses[0] with analysis.GetResultsData() as reader: result=reader.GetResult("U") result.SelectComponents(["X"]) mesh=analysis.MeshData nodes=mesh.NodeIds resultNodal=result.GetNodeValues(nodes) print("Max = " + str(max(resultNodal)))
You can also use the Dispose() function on the reader.