# Python node to export to GLTF

**URL:** <https://discourse.mcneel.com/t/python-node-to-export-to-gltf/191608>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [September 22, 2024, 7:02am UTC](https://discourse.mcneel.com/t/python-node-to-export-to-gltf/191608 "2024-09-22T07:02:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user883](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/user883/32/676385_2.png) [@user883](https://discourse.mcneel.com/u/user883)\
**Post date:** [September 22, 2024, 7:02am UTC](https://discourse.mcneel.com/t/python-node-to-export-to-gltf/191608/1 "2024-09-22T07:02:08Z")

</div>

Greetings,

I am looking for ghpython node to export to GLTF and got string output from GH , any ideas ?

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 22, 2024, 11:18am UTC](https://discourse.mcneel.com/t/python-node-to-export-to-gltf/191608/2 "2024-09-22T11:18:51Z")

</div>

I’m not sure if this is currently possible and if it makes sense at all.

Most likely you will have to bake the geometry before it can be exported.

With the current Grasshopper Rhino components you can streamline the creation of geometry with attributes. After baking, you can use one of a few scripts available in this forum to export the parts. With the @Helvetosaur script I’m using, the object name is used as file name. The script can be executed through a button in Rhino which I find quite straightforward.

---

<div class="post-metadata">

**Author:** ![scottd](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/scottd/32/494002_2.png) [@scottd](https://discourse.mcneel.com/u/scottd)\
**Post date:** [September 22, 2024, 12:16pm UTC](https://discourse.mcneel.com/t/python-node-to-export-to-gltf/191608/3 "2024-09-22T12:16:01Z")

</div>

I would use code driven file io. There is a grasshopper section here:

> **[Code-Driven File IO](https://developer.rhino3d.com/guides/rhinocommon/code-driven-file-io/#)**
>
> This guide gives an overview of using RhinoCommon to drive file format IO with code

Using the gltf file options:

[https://developer.rhino3d.com/api/rhinocommon/rhino.fileio.filegltfwriteoptions](https://developer.rhino3d.com/api/rhinocommon/rhino.fileio.filegltfwriteoptions)
