# The return value of the server side object method call with one or more parameters

**URL:** https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389
**Category:** Development
**Created:** [June 10, 2021, 1:56pm UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389 "2021-06-10T13:56:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Petr\_Melnikov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/petr_melnikov/32/5789_2.png) [@Petr\_Melnikov](https://discourse.paraview.org/u/Petr_Melnikov)
#### Post date: [June 10, 2021, 1:56pm UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/1 "2021-06-10T13:56:05Z")

</div>

Dear Experts,  
Does paraview provide the way to get the return value of the server side object method call with one or more parameters?

I know about properties with “information\_only” attribute, but this feature is suitable, if I understand correctly, only for methods without parameters. The attribute “number\_of\_elements\_per\_command” does not work in such case.

How can achieve this?

Thanks in Advance!

Petr

---

<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: [June 10, 2021, 2:11pm UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/2 "2021-06-10T14:11:22Z")

</div>

> [@Petr\_Melnikov](#):
>
> The attribute “number\_of\_elements\_per\_command” does not work in such case.

Correct.

Use a StringVectorProperty with a StringListDomain

---

<div class="post-metadata">

### Author: ![Petr\_Melnikov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/petr_melnikov/32/5789_2.png) [@Petr\_Melnikov](https://discourse.paraview.org/u/Petr_Melnikov)
#### Post date: [June 10, 2021, 3:35pm UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/3 "2021-06-10T15:35:09Z")

</div>

Hmm, explain, please  
For example, an object on the server has two methods:

```
// Adds the given string to the array
void AddString (const char * value);
// Counts the number of added strings that match the regular expression
int GetNumberOfStrings (const char * regExpr);

```

I want to get the result of the second method call on client application using proxy object. How can I do that using proxy properties?

---

<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: [June 11, 2021, 6:32am UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/4 "2021-06-11T06:32:04Z")

</div>

My bad, this was not the correct information.

Just a StringVectorProperty with information\_only should do the trick. You should manage the “number” side of things client side.

see VDFReaderPlugin/Readers/vtkVDFReader::GetPointArrayName for an example.

---

<div class="post-metadata">

### Author: ![Petr\_Melnikov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/petr_melnikov/32/5789_2.png) [@Petr\_Melnikov](https://discourse.paraview.org/u/Petr_Melnikov)
#### Post date: [June 12, 2021, 8:13am UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/5 "2021-06-12T08:13:40Z")

</div>

Thanks, @mwestphal

The vtkVDFReader::GetPointArrayName method is called using the vtkSIArraySelectionProperty (ArraySelectionInformationHelper) helper class. This class allows to form a list of array names on the server side without passing any additional information.

Having looked at the code for pulling/pushing messages for data exchange, I came to the conclusion that the only way to get the result of calling a method with parameters is to save the parameters on the server (something like a context), and then, using the saved data, call the method without parameters.

PS.  
I think it would be useful to add for StringVectorProperty the ability to pass its elements as arguments of remote method call in case of “information\_only” property.

---

<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: [June 14, 2021, 10:28am UTC](https://discourse.paraview.org/t/the-return-value-of-the-server-side-object-method-call-with-one-or-more-parameters/7389/6 "2021-06-14T10:28:09Z")

</div>

I agree with your PS.
