From 51c94b348946cea17cc1741f95fadf87d316868b Mon Sep 17 00:00:00 2001 From: Ned Coltman Date: Wed, 15 Dec 2021 13:48:47 +0100 Subject: [PATCH] [postprocessing] Add pvpython version check for line source --- bin/postprocessing/extractlinedata.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/postprocessing/extractlinedata.py b/bin/postprocessing/extractlinedata.py index d2f892d3fd..2a8d198ea8 100644 --- a/bin/postprocessing/extractlinedata.py +++ b/bin/postprocessing/extractlinedata.py @@ -14,6 +14,7 @@ try: SetActiveSource, PlotOverLine, CreateWriter, + GetParaViewVersion, ) except ImportError as exc: raise ImportError( @@ -102,8 +103,12 @@ for curFile in args["files"]: vtkFile = XMLUnstructuredGridReader(FileName=curFile) SetActiveSource(vtkFile) + pvPythonVersion = GetParaViewVersion() # apply and configure PlotOverLine filter - plotOverLine = PlotOverLine(Source="Line") + if pvPythonVersion >= 5.9: + plotOverLine = PlotOverLine(Source="Line") + else: + plotOverLine = PlotOverLine(Source="High Resolution Line Source") plotOverLine.Source.Resolution = args["resolution"] plotOverLine.Source.Point1 = args["point1"] plotOverLine.Source.Point2 = args["point2"] -- GitLab