Result retrieval
Luiza
Member Posts: 7
**
Hi,
I am using the following code to retrieve elemental result for total current density in Ansys WB 2022R2 in a coupled field module.
Model=ExtAPI.DataModel.Project.Model
result=Model.Analyses[0].Solution.Children[1]
result.PlotData
Does anyone know how can i access the value for a specific (let's say the first one) element only?
I need the value for one element to do a comparison later in code. I tried the reader.getresult but it doesn't give the correct display option or result.
Thank you in advance!
0
Best Answers
-
Something like this should work:
ResultDict = {} for Id, Val in zip(result.PlotData["Element"], result.PlotData["Values"]): ResultDict[Id]=Val ResultDict[MyElemId]
1 -
Or to simply get something by an index (this is NOT the element ID):
result.PlotData["Values"][MyIndex]
1