Batch Export C++



I would appreciate some help in the certain task I want to do. It is a relatively simple problem that I would normally approach with RhinoApp().RunScript…but here is the task and the question:

Task: (Batch) export every object in the Rhino file to a separate.obj file together with the.mtl file (textures)

Question: If RunScript is the best way to do this then how would that look for this task? How to attach mtl files to the obj ones? Can this be done on a “lower level” programmatically?


(Dale Fugier) #2

Hi Milos,


No, there is no SDK access to Rhino’s OBJ exporter.

– Dale


Hi Dale,

thanks for clarifying it. But I still dont get the way to do it with RunScript…how to export to .obj and particulary how to check the !Save Textures" box in the dialog automatically… Could you maybe give me an example of how this line of code looks like?



(Steve Baer) #4

@dale , Tim did write the V6 Obj exporter in RhinoCommon. I don’t think it will work for this case, but just thought you would like to know.



thanks for the info Steve…you are right, in this case it wont help cause I prefer C++ and need it for V5. I would really really appreciate the advice on how that RunScript line of code looks like…


(Dale Fugier) #6

Hi Milos,

Let me know if the attached sample is helpful.

– Dale

cmdTestMilos.cpp (3.0 KB)