Hi Alan,

How about the script:
> for key in GetSources().keys():
>     s = GetSources()[key]
>     Delete(s)
>     del s


Magician


On Dec 6, 2013, at 23:34, [email protected] wrote:

> Message: 3
> Date: Fri, 6 Dec 2013 03:37:45 +0000
> From: "Scott, W Alan" <[email protected]>
> Subject: Re: [Paraview] [EXTERNAL] Re:  Python scripting question
> To: Andy Bauer <[email protected]>
> Cc: "[email protected]" <[email protected]>
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
> 
> Utkarsh - interested in passing in your $0.02?
> 
> Thanks,
> 
> Alan
> 
> From: Andy Bauer [mailto:[email protected]]
> Sent: Tuesday, December 03, 2013 7:23 PM
> To: Scott, W Alan
> Cc: [email protected]
> Subject: [EXTERNAL] Re: [Paraview] Python scripting question
> 
> Hmm, I'm not sure this is the proper way to do it since I get a warning but 
> it appears to work:
> a = GetActiveSource() # requires a leaf of the pipeline tree to be selected
> Delete(a)
> The warning I get is:
> ERROR: In 
> C:\DBD\pvs-x64\paraview\src\paraview\ParaViewCore\ServerManager\Core\vtkSMProxyListDomain.cxx,
>  line 189
> 
> vtkSMProxyListDomain (0000000012E46ED0): Index 2 greater than max 1
> 
> 
> 
> Somewhere in the Python API there's a method to get the filter proxy by name 
> but I don't remember that off the top of my head. If this doesn't work for 
> you, Utkarsh probably has a better way :)
> 
> Andy
> 
> 
> On Tue, Dec 3, 2013 at 8:04 PM, Scott, W Alan 
> <[email protected]<mailto:[email protected]>> wrote:
> Hi,
> I have a user that is trying to delete all of the entries in the pipeline 
> browser, in a python script.  I tried using the trace recorder, and that 
> didn't work.  Does anyone have any idea what command would do this?
> 
> Thanks,
> 
> Alan
_______________________________________________
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