# Read configuration values from hexrays.cfg (and ida.cfg)

**URL:** <https://community.hex-rays.com/t/read-configuration-values-from-hexrays-cfg-and-ida-cfg/243>\
**Category:** Support\
**Tags:** idapython\
**Created:** [March 15, 2025, 9:00pm UTC](https://community.hex-rays.com/t/read-configuration-values-from-hexrays-cfg-and-ida-cfg/243 "2025-03-15T21:00:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harding](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/harding/32/37_2.png) [@Harding](https://community.hex-rays.com/u/Harding)\
**Post date:** [March 15, 2025, 9:00pm UTC](https://community.hex-rays.com/t/read-configuration-values-from-hexrays-cfg-and-ida-cfg/243/1 "2025-03-15T21:00:19Z")

</div>

I have found

```python
ida_hexrays.change_hexrays_config()

```

which can set values but I want to read them instead so I was hoping to find something in the style of:

```python
ida_hexrays.read_hexrays_config()
ida_hexrays.get_hexrays_config()

```

or that the `change_hexrays_config()` would return the value it was before it changed it but I cannot find anything like that.

What I am really trying to do: I’m running `decompile_many()` but since I have set `COLLAPSE_LVARS = YES` in my hexrays.cfg (I want it that way when I do manually work) the decompiled C file have no local variables. I can fix this by setting the `COLLAPSE_LVARS = NO` but I want to set that variable back to whatever it was set to before I started the `decompile_many()`

---

<div class="post-metadata">

**Author:** ![teresa\_hexrays](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/teresa_hexrays/32/11_2.png) [@teresa\_hexrays](https://community.hex-rays.com/u/teresa_hexrays)\
**Post date:** [March 19, 2025, 5:53pm UTC](https://community.hex-rays.com/t/read-configuration-values-from-hexrays-cfg-and-ida-cfg/243/2 "2025-03-19T17:53:02Z")

</div>

Hello Harding,  
Let me ask my colleagues if anybody has a potential solution for you. We’ll keep you posted.

---

<div class="post-metadata">

**Author:** ![teresa\_hexrays](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/teresa_hexrays/32/11_2.png) [@teresa\_hexrays](https://community.hex-rays.com/u/teresa_hexrays)\
**Post date:** [March 20, 2025, 1:02pm UTC](https://community.hex-rays.com/t/read-configuration-values-from-hexrays-cfg-and-ida-cfg/243/3 "2025-03-20T13:02:19Z")

</div>

Hello again,  
Currently, it looks like we don’t have an out-of-the-box solution for it. However, we noticed this situation in the ticket for future improvements, so chances are high we get back with positive news soon.
