Hallo everybody,
I try to write a python script, that will read some data, process this
in a filter pipeline and write a new file with the results. I am fine
so far, but I need to use the calculator filter for something like that:
'coordZ - offset'
Can somebody point out how to use it? That is what I tried so far:
new_r = r
new_r = servermanager.filters.MergeBlocks(Input=new_r)
new_r = servermanager.filters.CleanUnstructuredGrid(Input=new_r)
new_r = servermanager.filters.CellDataToPointData(Input=new_r, PassCellData=0)
new_r = servermanager.filters.Contour(Input=new_r,ContourValues=[0.5],
SelectInputScalars="AirVolumeFraction")
new_r = servermanager.filters.Calculator(Input=new_r,
ResultArrayName="SurfaceElevation" )
---- up to here anything is fine
new_r.AddCoordinateVectorVariable
---- the error is:
Syntax error: expecting a variable name; see position 0
I need to assign something, but how?
---- The rest is then
new_r.Function = 'coordsZ - 0.5'
new_r.UpdatePipeline()
I am gratefull for any help.
Cheers Johannes
--
Johannes Will
Pulverhofsweg 5
22159 Hamburg
Germany
Tel.: #49-40-644 199 29
Cell: #49-176-23 600 633
Mail: [email protected]
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview