Hello everybody,<div><br></div><div>I've been using Paraview for quite a long time but I didn't need the python scripting up to now.</div><div>I want to execute a series of plot over line in numerous points and different time steps so it is nothing</div>
<div>I can afford to do manually.</div><div>Looking on the net I was able to find out how to record a macro and how to create a writer so I</div><div>ended up with this script:</div><div><br></div><div>--------------------------------------------------------------------</div>
<div><div>try: paraview.simple</div><div>except: from paraview.simple import *</div><div>paraview.simple._DisableFirstRenderCameraReset()</div><div><br></div><div>fotobioreattore_foam = GetActiveSource()</div><div>PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )</div>
<div><br></div><div>PlotOverLine2.Source.Point1 = [-0.035100001841783524, -0.03509980067610741, 0.0]</div><div>PlotOverLine2.Source.Point2 = [0.035100001841783524, 0.035100001841783524, 0.4300000071525574]</div><div><br></div>
<div>DataRepresentation7 = Show()</div><div><br></div><div>PlotOverLine2.Source.Point1 = [-0.0, 0.0, 0.0]</div><div>PlotOverLine2.Source.Point2 = [0.0, 0.0, 0.4300000071525574]</div><div><br></div><div>XYChartView4 = GetRenderView()</div>
<div>DataRepresentation7.XArrayName = 'arc_length'</div><div>DataRepresentation7.SeriesVisibility = ['U (0)', '0', 'U (1)', '0', 'U (2)', '0', 'vtkValidPointMask', '0', 'arc_length', '0', 'Points (0)', '0', 'Points (1)', '0', 'Points (2)', '0', 'Points (Magnitude)', '0']</div>
<div>DataRepresentation7.UseIndexForXAxis = 0</div><div><br></div><div>Render()</div><div><br></div><div>#= create writer</div><div>source = PlotOverLine2 #PlotOverLine2.Source</div><div>writer = CreateWriter("/home/piota/csv.csv", source)</div>
<div>#writer = CreateWriter("/home/piota/csv.csv")</div><div>writer.FieldAssociation = "Points" # or "Cells"</div><div>writer.UpdatePipeline()</div><div>del writer</div></div><div>--------------------------------------------------------------------------</div>
<div><br></div><div>If I'm not mistaken, this should write a csv.csv file in my home folder but it doesn't write anything. No error is reported when I run the script but still I get no output.</div><div>I'm still a bit confused on which source I should specify, so I'm pretty sure that the writer part is incorrect.</div>
<div><br></div><div>Can somebody help me filling it out properly?</div><div><br></div><div>Thx in advance.</div><div><br></div><div>Luca</div>