# How to set up an object or property link with python

**URL:** https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321
**Category:** ParaView Support
**Tags:** python
**Created:** [January 13, 2020, 8:34am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321 "2020-01-13T08:34:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Tobias](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tobias](https://discourse.paraview.org/u/Tobias)
#### Post date: [January 13, 2020, 8:34am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/1 "2020-01-13T08:34:05Z")

</div>

Hi,  
I want to set up an object link between two clip planes within a macro written in python.  
Camera linking is easy with AddCameraLink(). Is there something similar for other links as well?

---

<div class="post-metadata">

### Author: ![Tobias](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tobias](https://discourse.paraview.org/u/Tobias)
#### Post date: [January 27, 2020, 8:15am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/2 "2020-01-27T08:15:56Z")

</div>

Is there any way to do this?

---

<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: [January 27, 2020, 8:23am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/3 "2020-01-27T08:23:19Z")

</div>

Even though it is not traced not exposed by a simple method, it is possible to create the links.

Here is how the CameraLink is created internally :

```
link = servermanager.vtkSMCameraLink()
link.AddLinkedProxy(viewProxy.SMProxy, 1)
link.AddLinkedProxy(viewProxyOther.SMProxy, 2)
link.AddLinkedProxy(viewProxyOther.SMProxy, 1)
link.AddLinkedProxy(viewProxy.SMProxy, 2)
RemoveCameraLink(linkName)
servermanager.ProxyManager().RegisterLink(linkName, link)

```

And here is the documentation that should get you started :  
[https://kitware.github.io/paraview-docs/latest/cxx/classvtkSMLink.html](https://kitware.github.io/paraview-docs/latest/cxx/classvtkSMLink.html)

---

<div class="post-metadata">

### Author: ![debbie-z](https://discourse.paraview.org/user_avatar/discourse.paraview.org/debbie-z/32/3156_2.png) [@debbie-z](https://discourse.paraview.org/u/debbie-z)
#### Post date: [March 2, 2020, 4:00am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/4 "2020-03-02T04:00:39Z")

</div>

I tried linking two slice planes together via AddCameraLink(slice1.SliceType, slice2.SliceType, ‘link0’) which produced no error in the python shell. However, after executing this command ParaView (5.6.0) crashes when I try to access “Tools\>Manage Links…”

Any idea why this might be happening?

---

<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: [March 2, 2020, 4:17am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/5 "2020-03-02T04:17:17Z")

</div>

Please open your own topic.

---

<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: [March 2, 2020, 4:17am UTC](https://discourse.paraview.org/t/how-to-set-up-an-object-or-property-link-with-python/3321/6 "2020-03-02T04:17:21Z")

</div>


