# is it possible to add new connections to a fitler port via the pipeline browser

**URL:** https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149
**Category:** ParaView Support
**Created:** [January 18, 2019, 9:57am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149 "2019-01-18T09:57:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![embeddedmz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/embeddedmz/32/142_2.png) [@embeddedmz](https://discourse.paraview.org/u/embeddedmz)
#### Post date: [January 18, 2019, 9:57am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/1 "2019-01-18T09:57:16Z")

</div>

Hello,

Everything is in the title ! I want to add a second connection to the port 0 of a filter via the pipeline browser. Is it feasible ?

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 18, 2019, 10:01am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/2 "2019-01-18T10:01:22Z")

</div>

- Right click on your filter
- Change inputs
- Click on the inputs you want to use
- Ok

---

<div class="post-metadata">

### Author: ![embeddedmz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/embeddedmz/32/142_2.png) [@embeddedmz](https://discourse.paraview.org/u/embeddedmz)
#### Post date: [January 18, 2019, 10:55am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/3 "2019-01-18T10:55:33Z")

</div>

I can only choose one filter (I tried using CTRL to select a second input but it won’t let me).

In fact, I don’t want to add an input to another port (my filter has only one port) ! I just want to add a connection to the first port of it (index 0) ! I have already done this in VTK with AddInputConnection…

If this feature doesn’t exist, I may spent some time to implement it and contribute it to ParaView… I just need a confirmation that it does not exist.

---

<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 18, 2019, 12:05pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/4 "2019-01-18T12:05:03Z")

</div>

This is because your filter does not declare its input as repeatable. Which filter are you using ?

---

<div class="post-metadata">

### Author: ![embeddedmz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/embeddedmz/32/142_2.png) [@embeddedmz](https://discourse.paraview.org/u/embeddedmz)
#### Post date: [January 18, 2019, 12:09pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/5 "2019-01-18T12:09:30Z")

</div>

You’re right ! I will fix that in my code and try again…

---

<div class="post-metadata">

### Author: ![embeddedmz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/embeddedmz/32/142_2.png) [@embeddedmz](https://discourse.paraview.org/u/embeddedmz)
#### Post date: [January 18, 2019, 3:54pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/6 "2019-01-18T15:54:59Z")

</div>

I’m using a custom filter, and no it still doesn’t work, with CTRL button I can’t select a second input for my filter having :

```
int myMagnitudeFilter::FillInputPortInformation(int port, vtkInformation* info)
{
    info->Set(vtkAlgorithm::INPUT_IS_REPEATABLE(), 1);

    return Superclass::FillInputPortInformation(port, info); // no information will be removed here
}

```

PS : I’m using ParaView 5.4.1

In the pqChangeInputDialog’s constructor, I saw that the multiple connection properties is retrieved from the proxy (thus XML isn’t it), so what should I do ?

Otherwise, is it possible to have a vtkWriter class with a single port (mandatory anyway) and having multiple connections in a Catalyst Pipeline ?

---

<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 21, 2019, 9:26am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/7 "2019-01-21T09:26:20Z")

</div>

You are missing the following xml code : `multiple_input="1"`

It may look like this :

```
      <InputProperty clean_command="RemoveAllInputs"
                     command="AddInputConnection"
                     multiple_input="1"
                     name="Input">
        <ProxyGroupDomain name="groups">
          <Group name="sources" />
          <Group name="filters" />
        </ProxyGroupDomain>
        <DataTypeDomain composite_data_supported="0"
                        name="input_type">
          <DataType value="vtkDataSet" />
        </DataTypeDomain>
        <Documentation>This property specifies the datasets to be merged into a
        single dataset by the Append Datasets filter.</Documentation>
      </InputProperty>
```

---

<div class="post-metadata">

### Author: ![embeddedmz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/embeddedmz/32/142_2.png) [@embeddedmz](https://discourse.paraview.org/u/embeddedmz)
#### Post date: [January 21, 2019, 9:56am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-new-connections-to-a-fitler-port-via-the-pipeline-browser/1149/8 "2019-01-21T09:56:48Z")

</div>

Thank you, Yes, I found how to do it, I had also to change SetInputConnection to AddInputConnection (I just took a look at filters.xml).

When using Catalyst, I noticed something odd : timestamps retrieved via vtkStreamingDemandDrivenPipeline::UPDATE\_TIME\_STEP key :

`double con1time = inputVector[0]->GetInformationObject(0)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()); double con2time = inputVector[0]->GetInformationObject(1)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());`

are not epochs when my filter has 2 inputs connections on its port, but rather incremental reals, something like: 1, 1.5, 2, 3, 4, 4.5 etc… in both connections.

Can you please give me an explanation ? How can I fix it ? Thanks.

Otherwise, the filter in question, is a writer, I succeeded in creating a python pipeline script via ParaView in which, I connected the output of 2 filters in the the first port of the writer, I used that in the XML (by the way, do you think my XML is “good” ?)

```
<ProxyGroup name="writers">

    <WriterProxy name="myHDF5Writer" class="myHDF5Writer" label="myHDF5Writer">

        <InputProperty name="Input" command="AddInputConnection" multiple_input="1">
            <DataTypeDomain name="input_type">
                <DataType value="vtkImageData"/>
            </DataTypeDomain>
        </InputProperty>

        <!-- Etc... -->

    </WriterProxy>

</ProxyGroup>

<ProxyGroup name="insitu_writer_parameters">

    <SourceProxy name="myHDF5Writer" class="vtkPVNullSource" label="myHDF5Writer">

        <InputProperty name="Input" multiple_input="1"> <!-- <===== Here... -->
            <ProxyGroupDomain name="groups">
                <Group name="sources"/>
                <Group name="filters"/>
            </ProxyGroupDomain>
            <DataTypeDomain name="input_type">
                <DataType value="vtkImageData"/>
            </DataTypeDomain>
        </InputProperty>

        <StringVectorProperty name="FileName" number_of_elements="1" default_values="filename.h5"/>

        <IntVectorProperty name="WriteFrequency" number_of_elements="1" default_values="1">
            <IntRangeDomain name="range" min="1"/>
        </IntVectorProperty>

        <IntVectorProperty name="PaddingAmount" number_of_elements="1" default_values="0">
            <IntRangeDomain name="range" min="0"/>
        </IntVectorProperty>

        <IntVectorProperty name="File lifetime (hours)" number_of_elements="1" default_values="1">
            <IntRangeDomain name="range" min="1"/>
        </IntVectorProperty>

        <Hints>
            <WriterProxy group="writers" name="myHDF5Writer"/>
        </Hints>

    </SourceProxy>

</ProxyGroup>

```

Thanks !
