CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

ParaView automizing with python

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2012, 11:38
Default ParaView automizing with python
  #1
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 4
Nigirim is on a distinguished road
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 is offline   Reply With Quote

Old   November 23, 2012, 06:43
Default
  #2
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 4
Nigirim is on a distinguished road
Quote:
Originally Posted by Nigirim View Post
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
Nigirim is offline   Reply With Quote

Old   November 26, 2012, 16:29
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Old   November 27, 2012, 03:40
Default
  #4
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 4
Nigirim is on a distinguished road
Thanks for your reply Bruno.

It worked perfectly

Nigirim
Nigirim is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Python in Openfoam in-built paraFoam (paraView 3.8.0) Man Yue ParaView 6 November 30, 2012 07:57
How to get Python Shell into ParaView 3.8.1? blaise OpenFOAM Installation 3 July 24, 2012 04:58
how to get access to ParaView Calculated Result via Python Jack_FR OpenFOAM Paraview & paraFoam 0 June 5, 2012 19:25
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
ParaView 33 Python Shell error mschoenberg OpenFOAM Paraview & paraFoam 2 August 20, 2008 10:42


All times are GMT -4. The time now is 14:42.