<div dir="ltr">I am sure you're misinterpreting the code. I created the extra vtkSM class in my example only so that I can do the "SendStream" somewhere. Anycase, I'll let you figure that out when you have the time.<div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 26, 2015 at 6:10 PM, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:16px;font-family:Calibri,sans-serif">
<div>Thanks Utkarsh,</div>
<div><br>
</div>
<div>I’ve decided to stick with my own solution for the time being – having to create extra vtkSMxxx classes for all the sources adds too much maintenance to the code, whereas just adding an #include seems cleaner. When my immediate deadline has passed I’ll
 look again at it.</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>JB</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday 24 September 2015 17:57<br>
<span style="font-weight:bold">To: </span>cscs <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><span class=""><br>
<span style="font-weight:bold">Subject: </span>Re: [Paraview] Send an array from client to server<br>
</span></div><div><div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">Attached is the solution, there a small mistake in my origin script:
<div><br>
</div>
<div>
<div> vtkClientServerStream stream;</div>
<div> stream << vtkClientServerStream::Invoke</div>
<div>              << VTKOBJECT(proxy)</div>
<div>               << SetValues</div>
<div>               << maxValues</div>
<div>               << stream.InsertArray(values, maxValues)</div>
<div>               << vtkClientServerStream::End;</div>
</div>
<div><br>
</div>
<div>Utkarsh</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Sep 21, 2015 at 8:40 AM, Utkarsh Ayachit <span dir="ltr">
<<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
John,<br>
<br>
That looks too convoluted. I haven't done this in a while so I'll need<br>
to refresh my memory a bit. I'll make an example today and then get<br>
back to you.<br>
<span><font color="#888888"><br>
Utkarsh<br>
</font></span>
<div>
<div><br>
On Sun, Sep 20, 2015 at 4:43 AM, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>> wrote:<br>
> Just following up so that when I’ve forgotten how to do it ...<br>
><br>
> This works<br>
><br>
> #define VTK_WRAPPING_CXX<br>
> #include "vtkClientServerStream.h"<br>
><br>
> ...<br>
><br>
><br>
> //  void SetSelectedGIds(int n, const int *Ids);<br>
>   void SetSelectedGIds(int N, int Ids[]);<br>
> //BTX<br>
>   void SetSelectedGIds(int N, vtkClientServerStreamDataArg<int> &temp0);<br>
> //ETX<br>
><br>
> And in the cxx, use the vtkClientServerStreamDataArg operator () to get<br>
> the T* pointer.<br>
><br>
> Then in the client GUI<br>
><br>
> vtkClientServerStream::Array array =<br>
>   {<br>
>     vtkClientServerStream::int32_array,<br>
>     static_cast<vtkTypeUInt32>(numValues),<br>
><br>
> static_cast<vtkTypeUInt32>(sizeof(vtkClientServerStream::int32_value)*numVa<br>
> lues),<br>
>     (int*)(data)<br>
>   };<br>
><br>
><br>
>   vtkClientServerStream stream;<br>
>   stream << vtkClientServerStream::Invoke<br>
>     << VTKOBJECT(proxy)<br>
>     << "SetSelectedGIds"<br>
>     << numValues<br>
>     << array;<br>
>   stream << vtkClientServerStream::End;<br>
><br>
> This correctly inserts the array and the type,size,data vars so that the<br>
> server reads them as expected.<br>
><br>
> I’m not happy about the fact that we have to spoof the wrapper generators,<br>
> but at least I don’t need to modify the ClientServerStreamArg<><br>
> implementation.<br>
><br>
><br>
><br>
> JB<br>
><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div></div></span>
</div>

</blockquote></div><br></div>