Hello all, I am making a Annotation for Clip filter that shows the current location. I have been trying to use the new PythonAnnotation filter but I am not able to access the Origin and Offset properties from the input to the filters Expression. This is the Expression I tried: 'At %.0f Northing' % input.ClipType.Offset+input.ClipType.Origin[1]
In order to get around this, I have made this small python script. > from paraview.simple import * > > # Get the active source > actSource = GetActiveSource() > > # Add the filter > anno = PythonAnnotation(actSource) > # Calculate the Northing, offset + origin > north = anno.Input[0].ClipType.Offset + anno.Input[0].ClipType.Origin[1] > > # Set the anno expression > exprStr = "'At %.0f Northing' % {0:.0f} ".format(north) > anno.Expression = exprStr > Show(anno) > Render() This works initially, but I am not able to figure out how to get filter to "update" when the properties of the Clip filter are changed. All suggestions and help are highly appreciated. Thanks Gudni Karl
_______________________________________________ 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