<div dir="ltr">Hi Dave,<div><br></div><div>Are you using one of the existing client side or are you trying to build your own UI?</div><div>Normally you should get the proxy id from the reply of the data that you loaded.</div>
<div><br></div><div>But you might be able to get more information on that API by looking at the PipelineManager widget JavaScript code and see how it handle representation change.</div><div><br></div><div>Or check the server side src/Web/Python/protocol.py to see what is done with the message.</div>
<div><br></div><div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 4:40 PM, Dave Allen <span dir="ltr"><<a href="mailto:david.allen@meliortechnology.com" target="_blank">david.allen@meliortechnology.com</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"><div>I’m using the Javascript API for 4.0.1 to try to render files remotely. A file renders correctly, but with the “Surface” representation. I’d like to change the representation to “Wireframe” (even default to this).</div>
<div>As far as I can tell from the docs, I need to call vtk:updateDisplayProperty() (RPC on protocols.ParaViewWebPipelineManager). Does this seem correct?</div><div><br></div><div>Below is the code that is not working. I’m totally guessing on the displayOptions object since the API docs don’t really specify much. I probably need to pass in the proxy_id as well, but I’m unclear how to get that.</div>
<div><br></div><div>Also, the only JavaScript API docs I can find are at the URL <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/</a>. Is there a ParaView4 version I should be looking at?</div>
<div><br></div><div>Much Thanks,</div><div>Dave</div><div><br></div><div><br></div><div>session.call("vtk:openFileFromPath",'./material.pvd').then(</div><div> function(reply){</div><div> console.log('****** Works fine, this line is printed ******');</div>
<div> viewport.resetCamera();</div><div> viewport.render();</div><div> });</div><div><br></div><div><div>var displayOptions = {</div><div> Representation: 'Wireframe'</div><div>}</div><div><br>
</div><div>session.call("vtk:updateDisplayProperty", displayOptions).then(</div><div> function(reply) {</div><div> console.log('****** This line never gets printed ******');</div><div> viewport.render();</div>
<div> });</div><div><br></div></div></div>
<br>
<p>This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient for this e-mail, you are hereby notified that you must not disseminate, copy or take action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and destroy this e-mail and its attachments.</p>
<br>_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>