# Given a MultiPieceDataSet, know which vertex is for each piece

**URL:** https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528
**Category:** ParaView Support
**Tags:** vtk
**Created:** [February 28, 2023, 9:03am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528 "2023-02-28T09:03:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [February 28, 2023, 9:03am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528/1 "2023-02-28T09:03:24Z")

</div>

In paraview, given a vtkMultiBlockDataSet of vtkUnstructedGrid, it is possible to show to which block each vertex or cells belongs by two means. By using vtkBlockColors coloring in the viewports, or in the spreadsheet, there is a column with the block id.

However, for a vtkMultiPieceDataSet of vtkUnstructedGrid, this is not possible. Is there anyway to see to which piece each vertex/cells belongs to?

I have tried with vtkCompositeIndex coloring in the viewport, but apparently the scale is incorrect, my multi piece has 8 pieces and the composite index is going from 8 to 16. Also, it doesn’t work for the spreadsheet view.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [March 21, 2023, 2:26am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528/2 "2023-03-21T02:26:36Z")

</div>

Individual pieces in a vtkMultiPieceDataSet are meant to be opaque and aren’t accessible in most of ParaView. However, you _can_ find out this information through the Find Data panel. Here’s how:

- Select a point or cell
- Type ‘v’ to open the Find Data panel
- You’ll see a table of selected cells/points like this:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/3/3d9dac90468ec16d43088f86b674e765ed8a21aa.png)

To see the Block Number column, click on the menu with the yellow grid (and downward-pointing arrow) and enable the “Block Number” entry. This should show you the individual piece numbers.

---

<div class="post-metadata">

### Author: ![hdz19900725](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hdz19900725/32/7157_2.png) [@hdz19900725](https://discourse.paraview.org/u/hdz19900725)
#### Post date: [January 10, 2025, 1:50am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528/3 "2025-01-10T01:50:36Z")

</div>

How to convert the Block Number to attribute for each point？Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 10, 2025, 8:17am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528/4 "2025-01-10T08:17:29Z")

</div>

GenerateIds should do the trick

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 10, 2025, 8:17am UTC](https://discourse.paraview.org/t/given-a-multipiecedataset-know-which-vertex-is-for-each-piece/11528/5 "2025-01-10T08:17:58Z")

</div>


