|
[Sponsors] |
November 19, 2018, 09:50 |
pvphyton Error
|
#1 |
New Member
Batu
Join Date: Dec 2016
Location: Turkey
Posts: 5
Rep Power: 10 |
Hello everyone,
I'm new to paraview scripting. I used the trace command and created a phyton script. I can use this script when I open paraview and use the Pyhton Shell there. However, when I want to use the command pvphyton MyScriptName.py I get the following error. Code:
Traceback (most recent call last): File "Re800.py", line 25, in <module> ResultsOpenFOAM = PVFoamReader(FileName='/home/batuhan/Masa\xc3\xbcst\xc3\xbc/Thesis/LaminarCases/Gmsh/144mm_From9mm/Comparison/Re800_BlockMesh/Results.OpenFOAM') NameError: name 'PVFoamReader' is not defined Code:
#### import the simple module from the paraview from paraview.simple import * #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() # set active view SetActiveView(None) CreateLayout('Layout #1') # Create a new 'Render View' renderView1 = CreateView('RenderView') renderView1.ViewSize = [1502, 858] renderView1.AxesGrid = 'GridAxes3DActor' renderView1.StereoType = 0 renderView1.Background = [0.32, 0.34, 0.43] # get layout layout1 = GetLayout() # place view in the layout layout1.AssignView(0, renderView1) # create a new 'PVFoamReader' ResultsOpenFOAM = PVFoamReader(FileName='/home |
|
Tags |
paraview, pyhton |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries | NickG | OpenFOAM Installation | 3 | December 30, 2019 01:21 |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |