# How to export the model into obj with material?

**URL:** <https://forums.sketchup.com/t/how-to-export-the-model-into-obj-with-material/91788>\
**Category:** SketchUp SDK\
**Created:** [March 26, 2019, 11:29am UTC](https://forums.sketchup.com/t/how-to-export-the-model-into-obj-with-material/91788 "2019-03-26T11:29:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajawat](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rajawat](https://forums.sketchup.com/u/rajawat)\
**Post date:** [March 26, 2019, 11:29am UTC](https://forums.sketchup.com/t/how-to-export-the-model-into-obj-with-material/91788/1 "2019-03-26T11:29:19Z")

</div>

Hi All,  
I’m new to SDK. There is ruby api to export model into obj format.  
Do we same option in SDK ?  
If not how can I export the model to obj . Any reading material which will help me out ?

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [March 26, 2019, 12:51pm UTC](https://forums.sketchup.com/t/how-to-export-the-model-into-obj-with-material/91788/2 "2019-03-26T12:51:53Z")

</div>

> [@rajawat](#):
>
> There is ruby api to export model into obj format.

Yes, because the importers and exporters are part of the application feature set and the Ruby API runs within the “live” SketchUp application.

> [@rajawat](#):
>
> Do we same option in SDK ?

No, because the SDK in designed to be used standalone or within 3rd party applications to create 3rd party importers and exporters from the 3rd party native format. In these scenarios the 3rd party coders would know more about their native format and would prefer (most likely) to code the output into or from their native format themselves.

But this also means the coder needs a good understanding of OBJ file format:

- [Object Files (.obj)](http://paulbourke.net/dataformats/obj/)

- [MTL OBJ materials file](http://paulbourke.net/dataformats/mtl/)

- [http://www.martinreddy.net/gfx/3d/OBJ.spec](http://www.martinreddy.net/gfx/3d/OBJ.spec)

- 

[http://www.cs.utah.edu/~boulos/cs3505/obj\_spec.pdf](http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf)

Secondly, having the code for import and export of all those foreign formats that the SketchUp application supports would probably bloat the SDK’s size.

However, … as OBJ is a defacto standard, it is likely you might find a LGPL or opensource C library for it that you can use without much effort.

[Google search “Wavefront OBJ export C library -object”](https://www.google.com/search?q=Wavefront+OBJ+export+C+library+-object)
