[Paraview] pvpython question

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Jul 3 09:48:00 EDT 2008


Here's the way to do it (note: this will work only in CVS version. For 
older versions there's another more complex way of doing it):


import paraview.servermanager as sm
sm.Connect()
sphereSource = sm.sources.SphereSource()
sphereSource.UpdatePipeline()

vtksphereSource = sphereSource.GetClientSideObject()
        # <--- returns vtkSphereSource instance
        #  <libvtkGraphicsPython.vtkSphereSource vtkobject at 0xc23d20>

vtksphereSource.GetOutput()
       # <--- returns vtkPolyData
       # <libvtkFilteringPython.vtkPolyData vtkobject at 0xc272a0>


Utkarsh



Stephens, Michael M ERDC-ITL-MS wrote:
>  er, well that's a negative.
> 
> the document you point to is the same thing that's in the book.
> also has the same footnote.
> 
> while Fetch will do this, the footnote implies that there is 
> a more advanced (sly) way of doing this when in built-in mode,
> else why have the footnote at all?
> 
> color me curious.
> 
> -m
> 
> -----Original Message-----
> From: Robert Maynard [mailto:robertjmaynard at gmail.com] 
> Sent: Wednesday, July 02, 2008 11:23 AM
> To: Stephens, Michael M ERDC-ITL-MS
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] pvpython question
> 
> It is covered in the Servermanager2.pdf which can be found at: 
> http://paraview.org/Wiki/images/f/f9/Servermanager2.pdf
> 
> Search for the command Fetch()
> 
> Stephens, Michael M ERDC-ITL-MS wrote:
>> on page 302 of the paraview 3 user guide there is a footnote 8 that says:
>>
>> "When running in built-in mode, there is a way of getting access to the
>> output of an algorithm directly, but it is too advanced to cover here."
>>
>> if it's too advanced for a book, i'll assume it's too advance for an email
>> response; but
>> i'll ask anyway.
>>
>> anyone know how to do what is mentioned in the footnote?
>>
>> -m
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>   
> 
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
> 


More information about the ParaView mailing list