CompositeDataSetIndex in Python script

I’m using the following code in a script to automate exporting of profiles from a datase:

plotOnIntersectionCurves1Display = Show(plotOnIntersectionCurves1, lineChartView1)
plotOnIntersectionCurves1Display.CompositeDataSetIndex = [2]
plotOnIntersectionCurves1Display.UseIndexForXAxis = 0
plotOnIntersectionCurves1Display.XArrayName = 'arc_length'

and while “XArrayName” and “UseIndexForAxis” values affect exported profiles as well as debugging in UI (parameters are set accordingly in the panels), “CompositeDataSetIndex” does not affect neither the exported profiles nor the UI.

Could it be a bug or maybe the command is misplaced in the script?

Looks like there is a bug in the way the widget is updated in the GUI when the command is run in python.
However the result (what you call “Exported profile” i suppose) should reflect the values used in your scripts.

Is that not the case ?

No, that’s not the case.

Some of the profiles generated via “plotOnIntersectionCurves” are made up of multiple polygonal meshes, some of which contain a limit amount of data which I would like to skip and that’s why I’d like to control which one is selected for the export, but even from the script the “CompositeDataSetIndex” has no effect as reported.

I can’t reproduce with ParaView 5.7

Which version are you testing with ?

5.7.0-RC2-MPI-Linux-Python2.7-64bit

I can also share the script if that helps to reproduce the issue.

Please test with 5.7.0 proper and with 5.8RC1.

Proper?

You are using an old Release Candidate, not the actual 5.7.0 release.

Ah.

Will do ASAP. Thanks.

I’ve just tried with the 5.8 release RC1 and found that:

1 - If I set CompositeDataSetIndex = [ ] the first polygonal mesh (out of 2) is selected in UI
2 - If I set CompositeDataSetIndex to 0, 1 or 2 the first polygonal is still selected in UI
3 - If I set CompositeDataSetIndex to 3 or higher no polygonal mesh is selected in UI

I still only see a Widget UI update issue with []. Everything works fine otherwise.

Steps to (not) reproduce :

  • Sphere, Apply
  • Cone, Apply
  • GroupDatasets together, Apply
  • PlotIntersectionOnCurve, Apply
  • Issue python commands to set the CompositeIndexes

https://gitlab.kitware.com/paraview/paraview/issues/19680 : the issue with the updating of the widget not working.