I am trying to unload the results in post processing so that i can move the corresponding .op2 and .bun files.
If the resultfiles are loaded in post processing it needs to be unloaded in order to move.
I have created an unload function as follows but it is dependent on the solution name. Is there a way to get all CAE.SolutionResult in the current session. I could not find this in the documentation.
To unload results, theSession.ResultManager.DeleteResult(sol
''Delete all results
For Each sol In sim_sol_names
solutionResult = CType(resultManager.FindObject("SolutionResult[" + sim_rev + "_" + sol + "]"), NXOpen.CAE.SolutionResult)
Catch err1 As System.Exception
There is not currently a way to get a collection of all result objects loaded in the session.
This would be a good enhancement request.
You could get results for all active Postviews by looping through an array of Postview IDs (NXOpen.CAE.Post.GetPostviewIds()) and getting the result for each postview (NXOpen.CAE.Post.GetResultForPostview())
Thank you for your response.
I had tried that option to get result from post views. But when there are multiple solutions and not all solutions have post views it causes problem in my case.
Dim ids() As Integer = theSession.Post.GetPostviewIds
If ids.Length > 0 Or ids IsNot Nothing Then
For Each id In ids
'theSession.Post.GetResultForPostview(id, result, resulparam)
For now i am using Resultmanager.Findobject("Journal Identifier") method to go ahead. But i wish there was a resultmanager.getsolutionresults() method.