# Adding string values to CellData

**URL:** https://discourse.paraview.org/t/adding-string-values-to-celldata/10049
**Category:** ParaView Support
**Tags:** vtk, python
**Created:** [July 25, 2022, 3:28pm UTC](https://discourse.paraview.org/t/adding-string-values-to-celldata/10049 "2022-07-25T15:28:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)
#### Post date: [July 25, 2022, 3:28pm UTC](https://discourse.paraview.org/t/adding-string-values-to-celldata/10049/1 "2022-07-25T15:28:47Z")

</div>

Is it possible to add string values to CellData? I am having trouble identifying cells at different timesteps. There is an idea to create a unique “string hash” for cells. I first determined the coordinates of the center of the cell (using the discussion [Add the cell center coordinates to the cell data](https://discourse.paraview.org/t/add-the-cell-center-coordinates-to-the-cell-data/560)), and then converted the coordinates to string form. But how to add this string to CellData? Is this the right way?

```auto
import vtk
…
out1 = vtk.vtkStringArray()
for i in range(number_of_cells):
    x,y,z = …
    s='{:+09.3f} {:+09.3f} {:+09.3f}'.format(x,y,z)
    out1.InsertNextValue(s)
output.CellData.append(out1, 'string_hash') # ???

```
