CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] ParaView automizing with python

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2012, 10:38
Default ParaView automizing with python
  #1
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 13
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, 05:43
Default
  #2
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 13
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, 15:29
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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, 02:40
Default
  #4
New Member
 
Join Date: Sep 2012
Posts: 26
Rep Power: 13
Nigirim is on a distinguished road
Thanks for your reply Bruno.

It worked perfectly

Nigirim
Nigirim is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview from python shell : Glew initialization and VTKcommoncorepython error pradyumnsingh ParaView 0 September 18, 2018 13:40
[General] Determining number of cores and/or paraview executable via python aerogt3 ParaView 0 December 9, 2014 05:54
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 aylalisa ParaView 4 June 13, 2014 08:52
How to get Python Shell into ParaView 3.8.1? blaise OpenFOAM Installation 3 July 24, 2012 04:58
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 06:22.