# Why no vtkStringArray as active attribute?

**URL:** https://discourse.paraview.org/t/why-no-vtkstringarray-as-active-attribute/8232
**Category:** Development
**Created:** [October 22, 2021, 7:17am UTC](https://discourse.paraview.org/t/why-no-vtkstringarray-as-active-attribute/8232 "2021-10-22T07:17:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cobo](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@cobo](https://discourse.paraview.org/u/cobo)
#### Post date: [October 22, 2021, 7:17am UTC](https://discourse.paraview.org/t/why-no-vtkstringarray-as-active-attribute/8232/1 "2021-10-22T07:17:08Z")

</div>

Within the `vtkDataSetAttributes::SetActiveAttribute` function, an error message will be issued and no action taken if the provided attribute is not a `vtkDataArray`, so a `vtkStringArray` would not qualify.

I am calling this function (indirectly, because `SetActiveScalars` is what I am calling) within a filter that is supposed to make a specific attribute active at the end, in order to have it shown in the render view with coloring. Within that filter it is possible that this attribute is any array type, and within ParaView, it is also possible to make a `vtkStringArray` attribute active and display colors accordingly.

If I would now go and “hack” the `vtkDataSetAttributes` class for my application in such a way that `vtkStringArray` attributes are acceptable: Would I break some functionality or is that check only a left-over from old times where `vtkStringArray` attributes were not yet allowed to be active?
