Hello,
I'm a bit stumped about how to point a 'Python Code' object in the results branch at the solution without using the 'After Solve' or 'After Post' callback.
The intention is that the code automatically adds a set of UDRs scoped to paths, evaluates them, retains them (to aid verification) and does some further calculations on the plot data from them to write a few outputs to the details pane.
I think a significant part of the issue is the request to 'EvaluateAllResults' after the creation of the UDRs; if I use the 'After Post' callback, it seems to get into an infinite loop (or produces an error indicating it would) because of this evaluation.
I can get the code to produce the desired outputs if I use the 'Get Post Commands' callback, but only if I'm explicitly pointing at the solution location (TheSoln=ExtAPI.DataModel.Project.Model.Analyses[0].Solution). I'd rather point it at the solution branch into which the Python Code object has been inserted (like is available with the After Post callback), but can't identify how to do so.
Any other workarounds or solutions to enable a code object to evaluate results within a specific solution branch without inducing an infinite loop or error would be appreciated.
Thanks