This is probably a noob question, but not unlikely from a inexperienced python/ParaView/C++ programmer & user of ParaView –
I would like to automate some stuffs (python or C++ scripting?) but dunno how to start since I’m new to scripting. Take the example case:
- Need to run my custom programmable filter to generate a spreadsheet with data, &
- Export do disk, such
.csvs at each timepoint automatically.
I am able to work though the first goal, with this link – https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#adding-a-new-point-cell-data-array-based-on-an-input-array
Content of my Programmable filter:
input0=inputs #Calcualtion volCell=volume(input0) #volCellP=input0.CellData["volCell"]*volFracP volFracP=input0.CellData["kinematicCloudTheta"]*1000 volCellP=volCell*volFracP vol1P=4/3*22/7*((5e-6)**3) numPCell=volCellP/vol1P # add to output output.CellData.append(volFracP, 'volFracP') output.CellData.append(volCellP, 'volCellP') output.CellData.append(numPCell, 'numPCell')
For the second goal, I went to: https://www.paraview.org/Wiki/ParaView/Users_Guide/List_of_writers#CSVWriter, but not sure where to add this & how to execute. I was wondering, I might be able to follow the underlying codes that are running if I can somehow make ParaView show the commands when e.g. I click on the export button on the generated spreadsheet & then adapt into a script. In longterm, that can be useful in learning scripting while working with different modules.
Anyone has any suggestion?