[Paraview] pvbatch and readers with multiple outputs

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Feb 11 11:25:53 EST 2014


Joe,

Something like following should do the trick:

from paraview.simple import *
....
> port = servermanager.OutputPort(reader, 1)
> Show(port)



On Mon, Feb 10, 2014 at 4:37 PM, Insley, Joseph A. <insley at anl.gov> wrote:
> Hi,
>
> I have a custom reader plugin which has multiple outputs.  From the GUI I can load up a data file, and can see the two outputs in the pipeline viewer. I can hide or show them independently, choose different representations, apply different filters, etc.  I've saved a python state file, and would now like to run this in pvbatch.  In my current state file only output 0 is visible.  When I run pvbatch this output is not being rendered.  I can call GetNumberOfOutputPorts() on the reader to discover how many ports it has (it correctly returns 2).  I would now like to call SetActiveSource to explicitly set to one of the outputs.  I can't seem to find the correct way to do this.  Does anyone have any suggestions?
>
> Thanks,
> joe
>
>
> _______________________________________________
> 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


More information about the ParaView mailing list