Currently I am unable to figure out how to create a set of points in paraview with the python shell or programmable filter. I have constructed a script <br>that can read a database and output a single point source for each point (see below). Is there something I am missing to instead construct a point set, or will I have to create a point set source object first?
<br><br>#!/usr/bin/env python<br>import time<br>import sys<br>import paraview<br>from pysqlite2 import dbapi2 as sqlite<br><br>COLS_TO_GET = 100<br><br># Locate the view to which we&#39;ll add the &quot;display&quot;. All views are
<br># registered in the group &quot;view_modules&quot; with the proxy manager.<br>#pxm = paraview.pyProxyManager()<br>iter = pxm.group_iter(&quot;view_modules&quot;);<br>activeView = None<br>for proxy in iter:<br>&nbsp; if proxy.IsA
(&quot;vtkSMRenderModuleProxy&quot;):<br>&nbsp;&nbsp;&nbsp; activeView = proxy<br>&nbsp;&nbsp;&nbsp; break<br>if activeView:<br>&nbsp; db = sqlite.connect(&#39;/home/rmaynard/ProjParaview/rmaynard/Python/mine.db&#39;)&nbsp; <br>&nbsp; c = db.cursor()<br>&nbsp; <br>&nbsp; #start time tracking
<br>&nbsp; startTime = time.time()<br>&nbsp; <br>&nbsp; c.execute(&#39;select * from data where lbExpl &gt; 0&#39;)<br>&nbsp; cols = c.fetchmany(COLS_TO_GET)<br>&nbsp; for row in cols:<br>&nbsp;&nbsp;&nbsp; grab the row x, y, z&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; (x,y,z) = row[:3]<br>
&nbsp;&nbsp;&nbsp; point = paraview.CreateProxy(&quot;sources&quot;,&quot;PointSource&quot;,&quot;sources&quot;, &quot;point.%d.%d.%d&quot;%(x,y,z))<br>&nbsp;&nbsp;&nbsp; point.SetCenter(x,y,z)&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; point.UpdateVTKObjects(); <br>&nbsp;&nbsp;&nbsp; disp = paraview.CreateDisplay
(point, activeView);<br>&nbsp;&nbsp; <br>&nbsp; activeView.StillRender();<br>&nbsp; #end time tracking<br>&nbsp; endTime = time.time()<br>&nbsp; print endTime-startTime<br>&nbsp; c.close()<br>&nbsp; db.close()&nbsp; <br><br>