# I have a question about running Python scripts in OmniGraph

**URL:** <https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986>\
**Category:** Isaac Sim\
**Created:** [June 3, 2024, 10:57am UTC](https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986 "2024-06-03T10:57:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hisamichi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/hisamichi/32/348476_2.png) [@Hisamichi](https://forums.developer.nvidia.com/u/Hisamichi)\
**Post date:** [June 3, 2024, 10:57am UTC](https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986/1 "2024-06-03T10:57:29Z")

</div>

Hello,  
Can I enter values from the OmniGraph into code that is executed in Script Node? And can I output the return value of the code outside the Script Node?  
I would like to use the code I have already created, but the if statements are complicated and I don’t want to replace them with Nodes.

---

<div class="post-metadata">

**Author:** ![qwan](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@qwan](https://forums.developer.nvidia.com/u/qwan)\
**Post date:** [June 11, 2024, 5:03pm UTC](https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986/3 "2024-06-11T17:03:47Z")

</div>

you can get and set attributes of any omnigraph nodes by calling

```auto
og.Controller.attribute("/action_graph/new_node_name.inputs:value").set("new value")
# and .get()

```

here’s the [tutorial page](https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_omnigraph_scripting.html#editing-a-graph) about it.

---

<div class="post-metadata">

**Author:** ![Hisamichi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/hisamichi/32/348476_2.png) [@Hisamichi](https://forums.developer.nvidia.com/u/Hisamichi)\
**Post date:** [June 12, 2024, 6:56am UTC](https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986/4 "2024-06-12T06:56:18Z")

</div>

Thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [June 26, 2024, 6:56am UTC](https://forums.developer.nvidia.com/t/i-have-a-question-about-running-python-scripts-in-omnigraph/294986/5 "2024-06-26T06:56:48Z")

</div>

Closed on June 26, 2024, 6:56am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
