Hi everyone, I need to get the points informations find by a QuerySelect in a macro, how could I do that ? For example, I want to find the point with the highest value in my dataset and I can achieve that using the find data widget in the UI but I can’t achieve the same result in a python script.
SelectPoints(query="(yourValue == max(yourValue))")
Thanks for your answer ! When I print the output I can’t find any array with my point data. And when I call selection.PointData I get a FieldDataInformation object and I don’t know how to use it.
I’m afraid i’m not following here.
I want to set a clip filter on the point location given by selectPoint. Is there any way to get this point data in my python script ?
You can manually do that. I do not think there is a way to do that automatically.
Ok thanks for your answer
I find a way to do it and I put it here in case of someone needs it. In order to get points giver by a query selector, you juste have to paraview.serverManager.fetch(yourSelection)
Example:
myData = XMLRectilinearGridReader(FileName = [blablabla])
QuerySelect(QueryString=‘(Value== max(Value))’, FieldType=‘POINT’, InsideOut=0)
SetActiveSource(myData)
extractSelection = ExtractSelection(Input=myData)
selectionData = paraview.servermanager.Fetch(extractSelection )
#now you can access your points with:
selectionData.GetPoint(id)