# C# Materials list and texture files

**URL:** <https://discourse.mcneel.com/t/c-materials-list-and-texture-files/169441>\
**Category:** Rhino Developer\
**Tags:** windows, csharp, rhino7\
**Created:** [November 17, 2023, 10:09am UTC](https://discourse.mcneel.com/t/c-materials-list-and-texture-files/169441 "2023-11-17T10:09:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tianmingyao](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tianmingyao/32/515927_2.png) [@tianmingyao](https://discourse.mcneel.com/u/tianmingyao)\
**Post date:** [November 17, 2023, 10:09am UTC](https://discourse.mcneel.com/t/c-materials-list-and-texture-files/169441/1 "2023-11-17T10:09:55Z")

</div>

Hello,  
Could anyone please give me some c# samples to get a list of all my materials in current RhinoDoc? I would like to get all used materials’ name and texture files’ name and path of the material.

I am confused with the difference between MaterialTable and RenderMaterialTable. rhinoDoc.Materials would return a MaterialTable, rhinoDoc.RenderMaterials would return a RenderMaterialTable, what’s the difference?

---

<div class="post-metadata">

**Author:** ![nathanletwory](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathanletwory/32/482880_2.png) [@nathanletwory](https://discourse.mcneel.com/u/nathanletwory)\
**Post date:** [November 17, 2023, 12:15pm UTC](https://discourse.mcneel.com/t/c-materials-list-and-texture-files/169441/2 "2023-11-17T12:15:11Z")

</div>

`RenderMaterialTable` is the new, preferred way of accessing materials. You get instances of `RenderMaterial`.

For all textures you can iterate over the `RenderTextures` table.

`RenderMaterial`, `RenderTexture` and `RenderEnvironment` all derive from `RenderContent`.

For RhinoCycles (which provides Raytraced and Rhino Render) I don’t directly access these tables, though, since I get material info via the ChangeQueue mechanism.

But iterate over `doc.RenderMaterials` and `doc.RenderTextures` to get these.
