Hi all,

I am currently working on a small Python script that should extract a block from a vtkMultiBlockDataSet. In particular, I have a PVD file which links each time step to the respective vtkMultiBlockDataSet. So I started with

pvd = OpenDataFile("data.pvd")

in general it's straightforward to extract a block via

eb = ExtractBlock(Input=pvd)
eb.BlockIndices = [1]

now I previously wrote my vtm files in serial. Because of that I knew exactly what the index of my block was (1 in this case). Now I'm writing my vtm files in parallel and using ParaView's trace functionality told me that my indices of the different blocks are completely different. So I would like to know how to get the index of the block I want to extract. I know the name of the block, so ideally I can have a get function that takes the name string as input and gives me the index integer as output.

The only success I had was actually reading the name of my blocks using

pvd.GetDataInformation().GetCompositeDataInformation().GetName(1)

or equivalently

pvd.GetDataInformation().GetCompositeDataInformation().GetDataInformation(1).GetCompositeDataSetName()

but I could not figure out how to obtain the index from these vtkPVDataInformation objects.

Any help is appreciated.

Kind regards,
Arno

_______________________________________________
Powered by www.kitware.com

ParaView discussion is moving! Please visit https://discourse.paraview.org/ for 
future posts.

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview

Reply via email to