What version of ParaView are you using? I couldn't reproduce the
issue. Remember that threshold is a filter and looking at your script,
it will get applied over the currently selected source.

Did you do any other python command between execution of the script
the second time, such as assigning a variable named Threshold?

Utkarsh

On Tue, Dec 7, 2010 at 4:57 AM, Oldrich Svec <[email protected]> wrote:
> Hi,
>
> I have created a very simple python script by Trace tool. I have just
> added a Treshold to the data. The script is as follows:
>
> try: paraview.simple
> except: from paraview.simple import *
> paraview.simple._DisableFirstRenderCameraReset()
>
> Threshold2 = Threshold()
>
> Threshold2.Scalars = ['POINTS', 'Rho']
> Threshold2.ThresholdRange = [0.0, 2300.0]
>
> Render()
>
> When I run the script for the first time, everything works fine. When
> I, however, run it once again I obtain an error saying:
>
> Traceback (most recent call last):
>  File "<string>", line 5, in <module>
> TypeError: 'Threshold' object is not callable
>
> Do you know, what I am doing wrong?
>
> Thank you,
> Oldrich Svec
> _______________________________________________
> 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
>
_______________________________________________
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

Reply via email to