# Create PCG Graph with Python

**URL:** <https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [February 27, 2024, 1:06am UTC](https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891 "2024-02-27T01:06:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CGextra](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cgextra/32/903130_2.png) [@CGextra](https://forums.unrealengine.com/u/CGextra)\
**Post date:** [February 27, 2024, 1:06am UTC](https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891/1 "2024-02-27T01:06:53Z")

</div>

Hello? I have a question while writing a script to create a PCG Graph with Python.  
I created a PCG Graph with the code below.

```auto
import unreal
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
asset_tools.create_asset('PCG_Test', "/Game/PCG_Graphs", unreal.PCGGraph, unreal.PCGGraphFactory())

```

I created a PCG Graph with the code below. However, I would like to know how to create and connect nodes such as Get Landscape Data, Surface Sampler, etc. within the PCG Graph using Python.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/3/90386e61e45610051a334af1696eb32792817b49.png)

For materials, I can create the desired expression using unreal.MaterialEditingLibrary().create\_material\_expression.  
Is there a function that performs a similar function within the PCG Graph?

---

<div class="post-metadata">

**Author:** ![AdrienLogut](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/adrienlogut/32/924340_2.png) [@AdrienLogut](https://forums.unrealengine.com/u/AdrienLogut)\
**Post date:** [March 12, 2024, 8:29pm UTC](https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891/2 "2024-03-12T20:29:04Z")

</div>

Hey there! We actually didn’t look at how Python is interfacing Unreal and if we need to have explicit bindings to expose PCG functions. So It is probably not possible at the moment, unless there are automatic bindings.

---

<div class="post-metadata">

**Author:** ![CGextra](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cgextra/32/903130_2.png) [@CGextra](https://forums.unrealengine.com/u/CGextra)\
**Post date:** [June 15, 2026, 5:42am UTC](https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891/3 "2026-06-15T05:42:16Z")

</div>

Thank you for your reply. It was so late sorry.
