# XML DoubleVectorProperty: four elements?

**URL:** https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705
**Category:** ParaView Support
**Created:** [November 2, 2020, 8:31pm UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705 "2020-11-02T20:31:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [November 2, 2020, 8:31pm UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705/1 "2020-11-02T20:31:01Z")

</div>

Hello,

I’m currently using this XML code to create an input with 3 elements:

```auto
 <DoubleVectorProperty 
    				name="Vector"
    				command="SetParameter"
    				initial_string="Vector"
    				number_of_elements="3"
    				default_values="0.0 0.0 0.0">
</DoubleVectorProperty>

```

This works fine with 1, 2 or 3 elements, but fails with 4 or more elements. How can I solve this?

(I know that 4 elements should be possible because the Mandelbrot source has several inputs with multiple elements)

PS: i’m using PV 5.7.0

Thank in advance!

Miguel

---

<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: [November 4, 2020, 8:30am UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705/2 "2020-11-04T08:30:33Z")

</div>

Please share the failing code.

---

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [November 4, 2020, 5:51pm UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705/3 "2020-11-04T17:51:32Z")

</div>

Hello,

Please, find in the attached file the XML file of a very basic programmable source that reproduces the problem: when “number\_of\_elements” is set to 4 (or larger), PV fails and close. Is there any way to create an input vector with 4 or more text boxes?

Thanks again !

Miguel

[TEST\_DOUBLE\_VECTOR\_PROPERTY.xml](https://discourse.paraview.org/uploads/short-url/g8O5aeyM8vDkXfxq5gimiGdRnGa.xml) (626 Bytes)

---

<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: [November 5, 2020, 9:47am UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705/4 "2020-11-05T09:47:16Z")

</div>

Here is a working one.

```xml
      <DoubleVectorProperty command="SetOriginCX"
                            default_values="-1.75 -1.25 0.0 0.0"
                            name="OriginCX"
                            number_of_elements="4">
        <DoubleRangeDomain name="range" />
        <Documentation>The four values of this property indicate (in order) the 
        components of C (real and imaginary) and the components of the initial
        value, X (real and imaginary).</Documentation>
      </DoubleVectorProperty>

```

---

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [November 7, 2020, 10:12am UTC](https://discourse.paraview.org/t/xml-doublevectorproperty-four-elements/5705/5 "2020-11-07T10:12:20Z")

</div>

Hello Mathieu,

Thanks for your answer.

However, it fails when I include this script into my original script (PV crashes). After some research, I realized that the function that you have provided belongs to the class “vtkImageMandelbrotSource” ([https://vtk.org/doc/nightly/html/classvtkImageMandelbrotSource.html](https://vtk.org/doc/nightly/html/classvtkImageMandelbrotSource.html)) and it creates a Mandelbrot after execution. However, I’m trying to create a Python programmable source which requires the class “vtkPythonProgrammableFilter”. Do you know if there is an equivalent to “SetOriginCX” but valid for the vtkPythonProgrammableFilter class?

Thanks again !

Miguel
