[Paraview-developers] Create programmable source via python shell

Joshua Murphy Joshua.Murphy at lasp.colorado.edu
Thu Aug 25 21:27:43 EDT 2016


I was just about to ask a very similar question, but I was wondering how to create a source in pvpython without using the programmable source.  I have a larger script that I would like to generate the source, but I am having trouble figuring out how to get my vtkStructuredGrid data into a source that can be visualized on a pipeline.  Any suggestions for this use case?

Thanks,
Josh


From: Paraview-developers <paraview-developers-bounces at paraview.org> on behalf of David E DeMarle <dave.demarle at kitware.com>
Date: Thursday, August 25, 2016 at 7:12 PM
To: "Czech, Matthew" <Matthew.Czech at pfizer.com>
Cc: "paraview-developers at paraview.org" <paraview-developers at paraview.org>
Subject: Re: [Paraview-developers] Create programmable source via python shell

Sure is.

Here is a minimal example.

from paraview.simple import *
programmableSource1 = ProgrammableSource()
programmableSource1.Script = 'print "Hello World"'
programmableSource1.UpdatePipeline()

In general, try Tools->Start Trace, make a source or anything really, Tools->Stop Trace to see how to do things.

good luck

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Thu, Aug 25, 2016 at 4:21 PM, Czech, Matthew <Matthew.Czech at pfizer.com<mailto:Matthew.Czech at pfizer.com>> wrote:
Hello,

Is it possible to create a programmable source via the python shell? Any information on this is much appreciated.

Thanks,
Matt

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160826/28438207/attachment.html>


More information about the Paraview-developers mailing list