Thanks - this was what my user wanted! Alan
-----Original Message----- From: Magician [mailto:f_magic...@mac.com] Sent: Sunday, December 08, 2013 8:16 AM To: Scott, W Alan Cc: ParaView Subject: [EXTERNAL] Re: Python scripting question 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, paraview-requ...@paraview.org wrote: > Message: 3 > Date: Fri, 6 Dec 2013 03:37:45 +0000 > From: "Scott, W Alan" <wasc...@sandia.gov> > Subject: Re: [Paraview] [EXTERNAL] Re: Python scripting question > To: Andy Bauer <andy.ba...@kitware.com> > Cc: "paraview@paraview.org" <paraview@paraview.org> > Message-ID: > <9047ee0d4d3c8e43b93980da10a073808648e...@exmb04.srn.sandia.gov> > Content-Type: text/plain; charset="us-ascii" > > Utkarsh - interested in passing in your $0.02? > > Thanks, > > Alan > > From: Andy Bauer [mailto:andy.ba...@kitware.com] > Sent: Tuesday, December 03, 2013 7:23 PM > To: Scott, W Alan > Cc: paraview@paraview.org > 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 > <wasc...@sandia.gov<mailto:wasc...@sandia.gov>> 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