CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   ParaView automizing with python (http://www.cfd-online.com/Forums/paraview/109643-paraview-automizing-python.html)

Nigirim November 22, 2012 11:38

ParaView automizing with python
 
Hi all,

I want to automize postprocessing with ParaView with a Pythonscript. So I have got two basic questions before I start trying.

1. Is it even possible to automize ParaView with just a Pythonscript? So that i just have to start ParaView and the script starts to run

2. If it is possible is there a list with the commands I can use in ParaView, like the one for Salome?

Thanks in advance
Nigirim

Nigirim November 23, 2012 06:43

Quote:

Originally Posted by Nigirim (Post 393677)
2. If it is possible is there a list with the commands I can use in ParaView, like the one for Salome?

I found something that is even better than a list of commands.
Tools -> start Trace is really nice

So my script is done but still one question remains.

Is it possible to autorun the script?

Nigirim

wyldckat November 26, 2012 16:29

Greetings Nigirim,

When in doubt, on Linux, you can usually run commands with "-help" or "--help" for more information. On Windows, it can also be "/?".
In ParaView's case:
Code:

paraview --help
You should get something like this:
Code:

  --connect-id=opt      Set the ID of the server and client to make sure they match.

  --cslog=opt          ClientServerStream log file.

  --data=opt            Load the specified data. To specify file series replace the numeral with a '.' eg. my0.vtk, my1.vtk...myN.vtk becomes my..vtk

  --data-directory=opt  Set the data directory where test-case data are.

  --disable-light-kit  When present, disables light kit by default. Useful for dashboard tests.

  --disable-registry   
  -dr                  Do not use registry when running ParaView (for testing).

  --exit                Exit application when testing is done. Use for testing.

  --help               
  /?                    Displays available command line arguments.

  --machines=opt       
  -m=opt                Specify the network configurations file for the render server.

  --script=opt          Set a python script to be evaluated on startup.

  --server=opt         
  -s=opt                Set the name of the server resource to connect with when the client starts.

  --state=opt          Load the specified statefile (.pvsm).

  --stereo              Tell the application to enable stereo rendering

  --stereo-type=opt    Specify the stereo type. This valid only when --stereo is specified. Possible values are "Crystal Eyes", "Red-Blue", "Interlaced", "Dresden", "Anaglyph", "Checkerboard"

  --test-baseline=opt  Add test baseline. Can be used multiple times to specify multiple baselines for multiple tests, in order.

  --test-directory=opt  Set the temporary directory where test-case output will be stored.

  --test-script=opt    Add test script. Can be used multiple times to specify multiple tests.

  --test-threshold=opt  Add test image threshold. Can be used multiple times to specify multiple image thresholds for multiple tests in order.

  --version           
  -V                    Give the version number and exit.

Looks like what you're looking for is this:
Code:

paraview --script=path/to/the/script/script.py
Best regards,
Bruno

Nigirim November 27, 2012 03:40

Thanks for your reply Bruno.

It worked perfectly :D

Nigirim


All times are GMT -4. The time now is 01:11.