Hello there,

I am trying to cook up a batch file for the visualization pipeline that I am 
doing on ParaView GUI so that I can run that same sequence in batch mode and in 
parallel using pvbatch. I can get most of the python script using the 
Tool->Start Trace option on ParaView GUI. However, Start Trace didn't capture 
python script when I do a File->Save Data command.

For example, if I open up ParaView 4.1.0 and do a Tool->Start Trace, and then 
load up a cone and hit Apply and then do a File-> Save Data into legacy vtk 
format, and then do a Tool->Stop Trace, I will get the following python script

------------------ start python script ------------------

try: paraview.simple

except: from paraview.simple import *

paraview.simple._DisableFirstRenderCameraReset()


Cone1 = Cone()


RenderView1 = GetRenderView()


DataRepresentation1 = Show()

DataRepresentation1.ScaleFactor = 0.1

DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]


RenderView1.CameraPosition = [0.0, 0.0, 3.2036135254332487]

RenderView1.CameraClippingRange = [2.309882128879306, 4.336364527086367]

RenderView1.CameraParallelScale = 0.8291561935301535


Render()


------------- end python script -------------------

I will get the cone data saved to legacy vtk format in a file
[simonsm@abc ~]$ cat test.vtk
# vtk DataFile Version 3.0
vtk output
ASCII
DATASET POLYDATA
POINTS 7 float
0.5 0 0 -0.5 0.5 0 -0.5 0.25 0.433013
-0.5 -0.25 0.433013 -0.5 -0.5 6.12323e-17 -0.5 -0.25 -0.433013
-0.5 0.25 -0.433013
POLYGONS 7 31
6 6 5 4 3 2 1
3 0 1 2
3 0 2 3
3 0 3 4
3 0 4 5
3 0 5 6
3 0 6 1

So, what is the python script command I need to save the data and how do I turn 
the python script from the Start Trace output into python script that I can run 
with pvbatch? Anything I need to strip off the output?

thanks
-simon
_______________________________________________
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

Reply via email to