# Property listing inconsistency between python and C++ ?

**URL:** https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737
**Category:** ParaView Support
**Created:** [May 29, 2024, 1:16pm UTC](https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737 "2024-05-29T13:16:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sherin.sugathan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sherin.sugathan/32/15264_2.png) [@sherin.sugathan](https://discourse.paraview.org/u/sherin.sugathan)
#### Post date: [May 29, 2024, 1:16pm UTC](https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737/1 "2024-05-29T13:16:15Z")

</div>

For a Glyph filter added in the pipeline browser of paraview, I am able to list all properties including the “`GlyphType`” property using the python interactive shell using the following two commands:

```auto
>>> glyph = FindSource("Glyph1")
>>> glyph.ListProperties()
['ComponentSelection', 'GlyphMode', 'GlyphTransform', 'Input', 'MaximumNumberOfSamplePoints', 'OrientationArray', 'ScaleArray', 'ScaleFactor', 'Seed', 'GlyphType', 'Stride', 'VectorScaleMode']

```

In my paraview plugin code in C++, when I tried to print the properties of `glyphProxy` using a `vtkSMPropertyIterator`, I dont get to see the “`GlyphType`” property.

```auto
debug: Property Name: ComponentSelection
debug: Property Type: vtkSMIntVectorProperty
debug: Property Name: GlyphMode
debug: Property Type: vtkSMIntVectorProperty
debug: Property Name: GlyphTransform
debug: Property Type: vtkSMProxyProperty
debug: Property Name: Input
debug: Property Type: vtkSMInputProperty
debug: Property Name: MaximumNumberOfSamplePoints
debug: Property Type: vtkSMIntVectorProperty
debug: Property Name: OrientationArray
debug: Property Type: vtkSMStringVectorProperty
debug: Property Name: ScaleArray
debug: Property Type: vtkSMStringVectorProperty
debug: Property Name: ScaleFactor
debug: Property Type: vtkSMDoubleVectorProperty
debug: Property Name: Seed
debug: Property Type: vtkSMIntVectorProperty
debug: Property Name: Source
debug: Property Type: vtkSMInputProperty
debug: Property Name: Stride
debug: Property Type: vtkSMIntVectorProperty
debug: Property Name: VectorScaleMode
debug: Property Type: vtkSMIntVectorProperty

```

Can anyone comment why does this happen? Not sure, but I guess the “`GlyphType`” is embedded inside the “`Source`” property? How can I set the “`GlyphType`” combobox to a certain selection?  
Tried setting the property blindly using

```auto
vtkSMPropertyHelper(glyphProxy, "GlyphType").Set("Sphere");

```

but I get a `failed to locate property` error.

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

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.paraview.org/user_avatar/discourse.paraview.org/christos_tsolakis/32/4450_2.png) [@Christos\_Tsolakis](https://discourse.paraview.org/u/Christos_Tsolakis)
#### Post date: [May 29, 2024, 2:40pm UTC](https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737/2 "2024-05-29T14:40:45Z")

</div>

> [@sherin.sugathan](#):
>
> `vtkSMPropertyIterator`, I dont get to see the “`GlyphType`” property.

This is because the property you are looking is `Source`. check the xml where the proxy is defined:  
(`VTKExtensions/FiltersGeneral/Resources/general_filters.xml`)

```auto
1449 <PropertyGroup label="Glyph Source">
1450 <Property name="Source" />
1451 </PropertyGroup>

```

This means that the `Glyph Source` panel holds the properties of the `vtkSMInputProperty` `Source`.  
Indeed, in the same file:

```auto
1232 <InputProperty command="SetSourceConnection"
1233 label="Glyph Type"
1234 name="Source">

```

This mean that the source property is labeled `Glyph Type` .

The properties you see in this group they come from the properties of each of the possible values of the dropdown.  
Which are listed few lines below:

```auto
1242 <ProxyListDomain name="proxy_list">
1243 <Proxy group="sources" name="ArrowSource" />
1244 <Proxy group="sources" name="ConeSource" />
1245 <Proxy group="sources" name="CubeSource" />
1246 <Proxy group="sources" name="CylinderSource" /> 
1247 <Proxy group="sources" name="LineSource" />
1248 <Proxy group="sources" name="SphereSource" />
1249 <Proxy group="sources" name="GlyphSource2D" />
1250 </ProxyListDomain>

```

In your case you are using a sphere source.

So back to your original question:

> [@sherin.sugathan](#):
>
> For a Glyph filter added in the pipeline browser of paraview, I am able to list all properties including the “`GlyphType`” property using the python interactive shell using the following two commands:

```auto
>>> glyph.GlyphType
<paraview.servermanager.Sphere object at 0x7f764aeb5430>
>>> glyph.GlyphType.ListProperties()
['Center', 'EndPhi', 'EndTheta', 'PhiResolution', 'Radius', 'StartPhi', 'StartTheta', 'ThetaResolution']
>>> glyph.GlyphType.ThetaResolution = 20
>>> Render()

```

---

<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: [May 29, 2024, 3:02pm UTC](https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737/3 "2024-05-29T15:02:07Z")

</div>

To add on to what Christos said, try listing the property “label” (GetPropertyLabel() in the iterator) instead of the “name”. Python uses property labels instead of names because the label is what you see in the GUI. In the case of the “GlyphType” property in Python, that is the label for the “Source” property.

---

<div class="post-metadata">

### Author: ![sherin.sugathan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sherin.sugathan/32/15264_2.png) [@sherin.sugathan](https://discourse.paraview.org/u/sherin.sugathan)
#### Post date: [May 29, 2024, 7:23pm UTC](https://discourse.paraview.org/t/property-listing-inconsistency-between-python-and-c/14737/4 "2024-05-29T19:23:57Z")

</div>

Thank you all! 🙂
