# Paraview-lite and RPC functions

**URL:** https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995
**Category:** Web Support
**Created:** [October 5, 2023, 9:29pm UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995 "2023-10-05T21:29:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Craig\_Walker](https://discourse.paraview.org/user_avatar/discourse.paraview.org/craig_walker/32/12552_2.png) [@Craig\_Walker](https://discourse.paraview.org/u/Craig_Walker)
#### Post date: [October 5, 2023, 9:29pm UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995/1 "2023-10-05T21:29:16Z")

</div>

Hello. I have a question around paraview and paraview-lite.

I have seen that inside paraview there are RPC functions available [https://gitlab.kitware.com/paraview/paraview/-/blob/master/Web/Python/paraview/web/protocols.py?ref\_type=heads](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Web/Python/paraview/web/protocols.py?ref_type=heads)

My question is, can all the RPC functions in this file be used inside paraview-lite, for example there is a RPC function called “pv.widgets.ruler.add”, is this available for use inside paraview-lite or is this an option that was supported in a previous web gui? If it is avilable is there any existing documentation on using these function to extend paraview-lite?

Thanks in advance for any assistance.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [October 6, 2023, 3:15pm UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995/2 "2023-10-06T15:15:38Z")

</div>

The classes within `paraview.web.protocols` [can be registered](https://github.com/Kitware/paraview-lite/blob/master/server/pvw-lite.py#L183-L195) within any ParaView Web application (even the [trame](https://kitware.github.io/trame/) ones) but then you need the client side to make usage of it. Those protocols are either used within public applications like ParaView-Lite or with applications that Kitware created for our customers.

---

<div class="post-metadata">

### Author: ![VictorCazanave](https://discourse.paraview.org/user_avatar/discourse.paraview.org/victorcazanave/32/12557_2.png) [@VictorCazanave](https://discourse.paraview.org/u/VictorCazanave)
#### Post date: [October 13, 2023, 3:50am UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995/3 "2023-10-13T03:50:55Z")

</div>

Hello,

The `ParaViewWebWidgetManager` class is already registered in ParaView-Lite, then I’ve been able to call the `pv.widgets.ruler.add` RPC function from the client side.  
Although it raises an error (which I’m still debugging), the ruler is added with [fixed points](https://github.com/Kitware/ParaView/blob/master/Web/Python/paraview/web/protocols.py#L4029), but these points seem not movable with the mouse.  
Since ParaView-Lite fits most of my needs (features, technical stack…), I would like to extend it, adding a ruler tool similar to the one in ParaView desktop application.  
Could you give some directions or steps to achieve that in ParaView-Lite please?

Thanks in advance for your help!

---

<div class="post-metadata">

### Author: ![VictorCazanave](https://discourse.paraview.org/user_avatar/discourse.paraview.org/victorcazanave/32/12557_2.png) [@VictorCazanave](https://discourse.paraview.org/u/VictorCazanave)
#### Post date: [October 13, 2023, 8:47am UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995/4 "2023-10-13T08:47:53Z")

</div>

After using the Trace tool in ParaView, I noticed that there is no function call about the ruler, until the Apply button is clicked. Then, I guess the widget to move the ruler’s points is handled on the client side. Is it correct? If so, does it mean I should use a vtk.js widget (e.g. `DistanceWidget`) to update the ruler in ParaView-Lite?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [October 13, 2023, 8:30pm UTC](https://discourse.paraview.org/t/paraview-lite-and-rpc-functions/12995/5 "2023-10-13T20:30:56Z")

</div>

The widget is managed on the server side, so there is no vtk-js to worry about here.

I don’t remember the details, and therefore, it is tricky to provide proper feedback here.  
It will require proper investigation to help you out. Feel free to contact [Kitware](https://www.kitware.com/contact/) if you want more focused help.
