Hi Walter, Sorry for the late reply. I have been swamped with writing documentation. An easier way of doing what you want is to use the Fetch method on the servermanager module. Look here for more information : http://paraview.org/Wiki/ParaView/Python_Scripting#Source_Proxies (the second example there).
In your case, it would look like: data = servermanager.Fetch(pm.GetProxiesOnConnection(ActiveConnection)["sources"]["IntegrateAttributes3"]) where data is a VTK data object (probably a polydata). -berk On Tue, Sep 16, 2008 at 11:09 AM, Walter Landry <[EMAIL PROTECTED]> wrote: > Walter Landry <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I have set up paraview so that it does some calculations and displays >> the result in a spreadsheet. I can save the state and then load it in >> a script with LoadState(). I know how to save images of the 3D views >> with GetRenderView().WriteImage. But I have not figured out how to >> get the data from the spreadsheet. Ideally, I would be like to have >> the script print out a number, although it would be fine to just save >> an image of the spreadsheet. >> >> I tried getting the list of proxies with >> >> >> paraview.servermanager.pyProxyManager().GetProxiesOnOcnnection(paraview.servermanager.ActiveConnection) >> >> I can get a SpreadSheetView object and SpreadSheetRepresentation >> objects, but I do not know what to do with them. I just can't manage >> to get numbers out. I am sure there is a way to do it, but I am a bit >> stumped right now. > > I figured it out. I can just connect them to a DataSetWriter using a > script like > > pm=ProxyManager() > > energy=pm.GetProxiesOnConnection(ActiveConnection)["sources"]["IntegrateAttributes3"] > > work=pm.GetProxiesOnConnection(ActiveConnection)["sources"]["IntegrateAttributes2"] > > energy_writer=writers.DataSetWriter(Input=energy,FileType=1,FileName="energy.vtk") > work_writer=writers.DataSetWriter(Input=work,FileType=1,FileName="work.vtk") > energy_writer.UpdatePipeline() > work_writer.UpdatePipeline() > > That writes the data to a file. > > Cheers, > Walter Landry > [EMAIL PROTECTED] > _______________________________________________ > ParaView mailing list > [email protected] > http://www.paraview.org/mailman/listinfo/paraview > _______________________________________________ ParaView mailing list [email protected] http://www.paraview.org/mailman/listinfo/paraview
