Enable all cell/point arrays in Catalyst V2 script

Suppose I have a data structure with some cell arrays (the same question could be applied to point arrays), A, B and C. I load this into ParaView, selecting all of these cell arrays and create some kind of pipeline with extractor that doesn’t depend on the specific fields (e.g. I might just save the data structure to some kind of VTK XML data format). When I export a Catalyst script, it will contain something like the line (my source is called input)

input.CellArrayStatus = ['A', 'B', 'C']

Say I want to use this script (either directly in ParaView or using Catalyst in-situ) for a similar data structure with cell arrays D, E and F. I could modify the line above to

input.CellArrayStatus = ['D', 'E', 'F']

but I would prefer not to need to check first what cell arrays are present in the second data structure.

Is it possible to modify the Catalyst script such that all Cell Arrays are automatically read into the pipeline? Perhaps there is a method to query what Cell Arrays are present in a particular source first?

Please forgive my ignorance if this is a stupid question. I’m not all that familiar with ParaView Python.

Hi there,
I am currently in the search for something like this as well. Let me know if you found a resolution.

Cheers

You can use the Data Informations to get the list of available arrays, and the set up the property accordingly.

Something like input.CellData.keys() should return the list of cell data array names.

This works after I have the particular arrays loaded. However, is there something possible to iterate over the possible arrays of Point and Cell data even before the array status is finalized or loaded?

Depending on the reader, the Data Information object may/should contain the array list before the first run of the pipeline, just after you instanciate it.

Other option: may be the filter initialize this property with all available arrays, so leaving this empty in your script will do the trick (the first time only: if arrays are added afterward, the prop will not be updated). So this is not the more reliable.