# Script-based editing of ParaView-UserSettings.json

**URL:** https://discourse.paraview.org/t/script-based-editing-of-paraview-usersettings-json/8137
**Category:** ParaView Support
**Created:** [October 7, 2021, 3:43pm UTC](https://discourse.paraview.org/t/script-based-editing-of-paraview-usersettings-json/8137 "2021-10-07T15:43:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![csniker](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c4cdca/32.png) [@csniker](https://discourse.paraview.org/u/csniker)
#### Post date: [October 7, 2021, 3:43pm UTC](https://discourse.paraview.org/t/script-based-editing-of-paraview-usersettings-json/8137/1 "2021-10-07T15:43:38Z")

</div>

I am trying to make a portable settings file that I can use across multiple machines instead of having to manually reset everything when I change machines. My colleague @theodorebaltis found a reasonable way of doing this, which was to open a GUI session of Paraview, change settings via `Edit > Settings`, then close the session. Whatever settings were changed were then saved to `ParaView-UserSettings.json` in my user `.config` directory. This works and is a perfectly fine method.

However, I encountered some strange behavior when I tried to do the same thing using a script executed with `pvpython`. The script I created is below, and the intention was to change `Settings > RenderViewSettings > LineOffsetParameters` to [0, -0.1] and change `Settings > ColorPalette > EdgeColor` to [0, 0, 0]:

```auto
from paraview.simple import *
#get proxy manager
pxm = servermanager.ProxyManager()
#get relevant settings proxies
rs = pxm.GetProxy('settings', 'RenderViewSettings')
cps = pxm.GetProxy('settings', 'ColorPalette')
#edit properties
rs.SetPropertyWithName('LineOffsetParameters', [0, -0.1])
cps.SetPropertyWithName('EdgeColor', [0, 0, 0])

```

I tested both of these methods in the Python shell in the GUI and they work as intended. But if I run the script standalone using `pvpython`, **only the changes to LineOffsetParameters will show up** in `ParaView-UserSettings.json`.

I take the script above and change the values to something else (like [0, -0.09]), and the LineOffsetParameters will always be modified in the `.json` file. But any other parameter I’ve tried doesn’t show up.

So is there a better way to do this that I’m not aware of? My ideal goal is to have one script I can stash away with all my favorite settings in it. Then I can run that via `pvpython` and have my settings available immediately. I can then extend this to having one script for each of many different settings profiles, giving me the ability to quickly switch between settings profiles.
