[Paraview] [EXTERNAL] Re: Python scripting question
Scott, W Alan
wascott at sandia.gov
Mon Dec 9 18:42:55 EST 2013
Thanks - this was what my user wanted!
Alan
-----Original Message-----
From: Magician [mailto:f_magician at 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-request at paraview.org wrote:
> Message: 3
> Date: Fri, 6 Dec 2013 03:37:45 +0000
> From: "Scott, W Alan" <wascott at sandia.gov>
> Subject: Re: [Paraview] [EXTERNAL] Re: Python scripting question
> To: Andy Bauer <andy.bauer at kitware.com>
> Cc: "paraview at paraview.org" <paraview at paraview.org>
> Message-ID:
> <9047EE0D4D3C8E43B93980DA10A073808648E4B5 at 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.bauer at kitware.com]
> Sent: Tuesday, December 03, 2013 7:23 PM
> To: Scott, W Alan
> Cc: paraview at 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 <wascott at sandia.gov<mailto:wascott at 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
More information about the ParaView
mailing list