# Save Material RhinoCommon

**URL:** <https://discourse.mcneel.com/t/save-material-rhinocommon/75937>\
**Category:** Rhino Developer\
**Tags:** material\
**Created:** [December 6, 2018, 7:50pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937 "2018-12-06T19:50:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/harper/32/509450_2.png) [@Harper](https://discourse.mcneel.com/u/Harper)\
**Post date:** [December 6, 2018, 7:50pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/1 "2018-12-06T19:50:37Z")

</div>

Hi There!

Does anyone know if a material Rhino.DocObjects.Material can be saved using Rhinocommon as .rmtl file?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [December 6, 2018, 8:11pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/2 "2018-12-06T20:11:59Z")

</div>

Hi @Harper, one way would be to script below commands:

```
RenderSaveMaterialToFile
RenderLoadMaterialFromFile

```

\_  
c.

---

<div class="post-metadata">

**Author:** ![Harper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/harper/32/509450_2.png) [@Harper](https://discourse.mcneel.com/u/Harper)\
**Post date:** [December 6, 2018, 8:34pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/3 "2018-12-06T20:34:44Z")

</div>

Hi @clement, I’m afraid it doesn’t work in Rhino 6… there is no commands like that, probably it’s only for Rhino 5.

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [December 6, 2018, 10:14pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/4 "2018-12-06T22:14:01Z")

</div>

Hi @Harper, sorry i only tested this in V5, in V6 try to script the `_Materials` command. You’ll need to pass material name or id and the path to save to when saving. For loading the path is required too:

```
_-Materials _Options _SaveToFile 
_-Materials _Options _LoadFromFile 

```

@pascal, probably saving needs some love. On my system, which i admit is a bit old, saving a single material does take a lot of time and `_EnterEnd` is not recognized. I used this instead:

```
_-Materials _Options _SaveToFile "MatName" "C:\Folder\MatName.rmtl" _Enter _Enter

```

\_  
c.

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [December 6, 2018, 10:16pm UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/5 "2018-12-06T22:16:49Z")

</div>

Hi Clement - thanks, that reminds me to check on `EnterEnd` on RDK commands in general, I think it may not be hooked up there, I’ve run into that a couple of times it seems to me - I’ll check.

[https://mcneel.myjetbrains.com/youtrack/issue/RH-49825](https://mcneel.myjetbrains.com/youtrack/issue/RH-49825)

-Pascal

---

<div class="post-metadata">

**Author:** ![Harper](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/harper/32/509450_2.png) [@Harper](https://discourse.mcneel.com/u/Harper)\
**Post date:** [December 11, 2018, 12:48am UTC](https://discourse.mcneel.com/t/save-material-rhinocommon/75937/6 "2018-12-11T00:48:28Z")

</div>

Thanks, it works a little bit slow but working.

Thanks again!
