[Paraview-developers] JavaScript API: change representation

Dave Allen david.allen at meliortechnology.com
Fri Jan 31 18:40:48 EST 2014


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).
As far as I can tell from the docs, I need to call vtk:updateDisplayProperty() (RPC on protocols.ParaViewWebPipelineManager).  Does this seem correct?

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.

Also, the only JavaScript API docs I can find are at the URL http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/.  Is there a ParaView4 version I should be looking at?

Much Thanks,
Dave


session.call("vtk:openFileFromPath",'./material.pvd').then(
    function(reply){
        console.log('****** Works fine, this line is printed ******');
        viewport.resetCamera();
        viewport.render();
    });

var displayOptions = {
    Representation: 'Wireframe'
}

session.call("vtk:updateDisplayProperty", displayOptions).then(
    function(reply) {
        console.log('****** This line never gets printed ******');
        viewport.render();
    });


-- 
 

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20140131/554531b0/attachment.html>


More information about the Paraview-developers mailing list