Get obj from RhinoDoc without write in file

obj

(Visiado Al Ordenador) #1

Hi all,
I’m trying to get the obj file from a RhinoDoc to put in string without make a file, I try to see the FileObj.Write sourecode without luck also I try to make a ram file without luck. Anyone know how can I do this?

For now I have this:

Thanks in advance


(Dale Fugier) #2

Hi @visiado.al.ordenador,

Your best bet is to write to a temporary file and then open the temporary file and read the text out of it.

– Dale


(Visiado Al Ordenador) #3

hi @dale,
The problem is that if I don’t want to write it in file system for security reasons is the same that if I write in temp or anywhere


(Dale Fugier) #4

Hi @visiado.al.ordenador,

I’ve made a request to add stream access to our OBJ writer.

https://mcneel.myjetbrains.com/youtrack/issue/RH-44338

What would you expect us to do with the material (.MTL file)?

Just curious, why do you need this in memory and not on disk? What problem does this help you solve?

– Dale


(Visiado Al Ordenador) #5

Hi @dale,

Thanks for the request, I need to work with the obj file in code and if I put it in the filesystem there can be copy/pasted to somewhere, I don’t care about .MTL because I only need .OBJ file.
For the moment I solved this here: Get an obj object from mesh

A lot of thanks @dale :grin: :grin: