# Getting Surface LIC representation through python script

**URL:** https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695
**Category:** ParaView Support
**Created:** [October 9, 2018, 9:10am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695 "2018-10-09T09:10:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![olek\_warc](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/a9adbd/32.png) [@olek\_warc](https://discourse.paraview.org/u/olek_warc)
#### Post date: [October 9, 2018, 9:10am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/1 "2018-10-09T09:10:04Z")

</div>

Hi, I am postprocessing an OpenFOAM CFD simulation in ParaView using python script and paraview tracer. I want to obtain slices with total pressure coefficient plots (managed to get this working ok) and velocity LIC. Unfortunately I am struggling to change slice representation to Surface LIC - all the plots I am getting from this script use “Surface” representation.

Scroll to line 274 to see how exactly I am trying to switch to LIC.

If you have any ideas on how to troubleshoot this I’d really appreciate help!  
Regards!

[postProZ\_v1.py](https://discourse.paraview.org/uploads/default/original/1X/c36d5734c5d2d19141904beab931812f1e070574.py) (8.2 KB)

---

<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: [October 9, 2018, 9:36am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/2 "2018-10-09T09:36:51Z")

</div>

I tried a simpler script that seems to work perfectly on paraview master.[test.py](https://discourse.paraview.org/uploads/default/original/1X/994cb70fd64749e8c06d67940253e52653f12842.py) (5.5 KB)

---

<div class="post-metadata">

### Author: ![olek\_warc](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/a9adbd/32.png) [@olek\_warc](https://discourse.paraview.org/u/olek_warc)
#### Post date: [October 9, 2018, 4:18pm UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/3 "2018-10-09T16:18:12Z")

</div>

Hi Mathieu,

Thanks for getting back to me!

1. When I try to just run your script I get a message

_Traceback (most recent call last):  
File “test\_LIC.py”, line 36, in   
wavelet1Display.GaussianRadius = 0.1  
File “/usr/lib/paraview/site-packages/paraview/servermanager.py”, line 453, in **setattr**  
“to add this attribute.”)  
AttributeError: Attribute GaussianRadius does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add\_attribute() if you really want to add this attribute._

1. I tried following your advice though and modifying my original script to use

_slice1Display.SelectInputVectors = [‘POINTS’, ‘U’]_

slice definition, however this also results in the following error:

_Traceback (most recent call last):  
File “postProZ\_v1lic.py”, line 237, in   
slice1Display.SelectInputVectors = [‘POINTS’, ‘U’]  
File “/usr/lib/paraview/site-packages/paraview/servermanager.py”, line 453, in **setattr**  
“to add this attribute.”)  
AttributeError: Attribute SelectInputVectors does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add\_attribute() if you really want to add this attribute._

Any ideas how to troubleshoot this?

Thanks,  
Olek[postProZ\_v1lic.py](https://discourse.paraview.org/uploads/default/original/1X/a621e92c2ff8ce84bcad1d51b400b6f79ab293cc.py) (7.8 KB)

---

<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: [October 10, 2018, 8:41am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/4 "2018-10-10T08:41:34Z")

</div>

I’m sorry, I always forget that generated python script are not retro compatible.  
With which version of ParaView are you working ?

---

<div class="post-metadata">

### Author: ![olek\_warc](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/a9adbd/32.png) [@olek\_warc](https://discourse.paraview.org/u/olek_warc)
#### Post date: [October 11, 2018, 7:11am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/5 "2018-10-11T07:11:55Z")

</div>

Hi Mathieu

I have 5.4.1 64bit, running on Ubuntu

Olek

---

<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: [October 11, 2018, 7:37am UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/6 "2018-10-11T07:37:09Z")

</div>

Here is a working python script for ParaView 5.4.1  
[test.py](https://discourse.paraview.org/uploads/default/original/1X/af2baa7c01cbe2fc10fc7be06e60fbc5eabdacc6.py) (3.0 KB)

---

<div class="post-metadata">

### Author: ![olek\_warc](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/a9adbd/32.png) [@olek\_warc](https://discourse.paraview.org/u/olek_warc)
#### Post date: [October 11, 2018, 3:16pm UTC](https://discourse.paraview.org/t/getting-surface-lic-representation-through-python-script/695/7 "2018-10-11T15:16:13Z")

</div>

Thanks, managed to get it working now 🙂
