<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; "><div style="font-family: Calibri, sans-serif; ">Hello,</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">I am trying to create source with the programmable Source with the following script:</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; "><br></div><div><div><font class="Apple-style-span" face="Courier">from paraview.util import SetOutputWholeExtent</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">out = self.GetOutput()</font></div><div><font class="Apple-style-span" face="Courier">newPoints = vtk.vtkPoints()</font></div><div><font class="Apple-style-span" face="Courier">newArray  = vtk.vtkDoubleArray()</font></div><div><font class="Apple-style-span" face="Courier">newArray.SetName("newArray")</font></div><div><font class="Apple-style-span" face="Courier">newArray.SetNumberOfComponents(1)</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">SetOutputWholeExtent(self, [-90,90,-90,90,0,0])</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><span class="Apple-style-span" style="font-family: Courier; ">for j in range(-90,91):</span></div><div><font class="Apple-style-span" face="Courier">   for i in range(-90,91):</font></div><div><font class="Apple-style-span" face="Courier">      newPoints.InsertNextPoint(i,j,0)</font></div><div><font class="Apple-style-span" face="Courier">      newArray.InsertNextValue(i+j)</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">out.SetPoints(newPoints)</font></div><div><font class="Apple-style-span" face="Courier">out.GetPointData().AddArray(newArray)</font></div></div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">I was trying to create it with a structured grid, but that just causes ParaView to crash when I try to look at the Spreadsheet view.</div><div style="font-family: Calibri, sans-serif; ">Creating it as PolyData, it creates just fine, but the only way I can visualize the data in the render view is with glyphs.  Surface and others do not function at all, they just give me a blank screen.</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">Can someone help me figure out how to make this work?  Is there a better way to create a square 2-D grid like this?</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">Thanks,</div><div style="font-family: Calibri, sans-serif; ">Josh</div></body></html>