|
[Sponsors] |
[General] NameError: name 'LegacyVTKReader' is not defined |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 26, 2013, 09:54 |
NameError: name 'LegacyVTKReader' is not defined
|
#1 |
Senior Member
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 13 |
Hello,
I'm trying to run a very simple python script with Paraview 4.0.1 64 bit and I get the error message NameError: name 'LegacyVTKReader' is not defined The script is : Code:
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() solid_vtk = LegacyVTKReader( FileNames=['D:\\PostProcessing\\solid.vtk'] ) Render() Can someone test it? Maybe I'm not importing the paraview commands properly? Any advice is welcome Also: If I type solid_vtk = LegacyVTKReader( FileNames=['D:\\PostProcessing\\solid.vtk'] ) in the python shell, it works... But I'd like to use a rather complex script which I can't type in the shell.... Eloïse |
|
September 28, 2013, 13:24 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Hi Eloïse,
Unfortunately not all macros generated by the Trace feature in ParaView will work out-of-the-box. Try this script instead: Code:
from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() solid_vtk = LegacyVTKReader( FileNames=['D:\\PostProcessing\\solid.vtk'] ) Render() Best regards, Bruno
__________________
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] How can I define different zones in ICEM? | llrr | ANSYS Meshing & Geometry | 14 | February 12, 2017 14:44 |
UDF link fortran source | yorelchr | Fluent UDF and Scheme Programming | 0 | February 7, 2013 04:44 |
using METIS functions in fortran | dokeun | Main CFD Forum | 7 | January 29, 2013 05:06 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
OpenFOAM13 for Mac OSX Darwin 104 | hjasak | OpenFOAM Installation | 70 | September 24, 2010 06:06 |