Pat, Thanks for the reply. I tried giving an UpdatePipeline() call, but seemed to be the same result.
Any other thoughts? Matt On Tue, Apr 6, 2010 at 2:07 PM, pat marion <pat.mar...@kitware.com> wrote: > Try calling avgData.UpdatePipeline(). The filters are not actually > executed until there is demand. Usually a call to Render() causes this > demand, but for IntegrateVariables there is nothing to render. Not sure if > Fetch is supposed to automatically called UpdatePipeline or not. > > Pat > > On Tue, Apr 6, 2010 at 1:53 PM, Matthew Cragun <mcra...@totalsim.us>wrote: > >> >> I have a bit of code where I read in a data file, extract a small portion >> of it and then integrate the variables of the extracted portion. In my >> python code I then fetch the data from the server with the intent to write >> it out to a log file. The issue that I have come across is when I run my >> script in the Python Shell it gives me <0,0,0> for my tuple. Then if I >> repeat the final four lines interactively in the Python Shell starting with >> the fetch command I get a proper result of <0.14, 0.5, 0>. Any ideas why I >> can't fetch the data properly in the script but can right after in >> interactively? >> >> The script looks like: >> >> #**********************************************************8 >> #Do X-direction >> xscale = 1.0 >> yscale = 1.0/(2*ymax) >> zscale = 1.0/zmax >> >> print "load Fluid" >> fluid = XMLPolyDataReader(FileName=xSlice) >> fluid.PointArrayStatus = ['U', 'p'] >> RenderView1 = GetRenderView() >> DataRepresentation1 = Show() >> >> print "extract Block" >> fluidBlock = ExtractCellsByRegion(Input = fluid, IntersectWith = "Box") >> fluidBlock.IntersectWith.Scale = [xscale, yscale, zscale] >> DataRepresentation2 = Show() >> >> print "integrate" >> avgData = IntegrateVariables(Input = fluidBlock) >> DataRepresentation3 = Show() >> Render() >> >> data = servermanager.Fetch(avgData,0) >> pointData = data.GetPointData() >> avgVar = pointData.GetArray(0).GetTuple3(0) >> print avgVar >> #**************************************************** >> >> Thanks, >> -- >> Matt Cragun >> >> Engineer >> TotalSim LLC >> 7003 Post Road, >> Suite 415 >> Dublin, Ohio 43016 >> O: (614) 255-7426 >> M: (801) 404-6021 >> E: mcra...@totalsim.us >> >> _______________________________________________ >> 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 >> >> > -- Matt Cragun Engineer TotalSim LLC 7003 Post Road, Suite 415 Dublin, Ohio 43016 O: (614) 255-7426 M: (801) 404-6021 E: mcra...@totalsim.us
_______________________________________________ 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