How to serialize rhino models?


(Hans) #1

I want to serialize the models of a rhino file and store it in a database. In this way, I can restore the model to a new file by reading the serialization from the database. How can I realize it? Thanks.


(Nathan 'jesterKing' Letwory) #2

That entirely depends on the format you want to use, text, binary etc. The easiest thing would be to select each object in turn and then export selection, save as 3dm. Then put the resulting 3dm in your database


(Hans) #3

Very appreciate for your answer. But if I want to convert it into text, what should I do? We use SQL Server as the database. When I create a new model, the model should be put into the database immediately. Then, other members of our team can update their models by pulling the new data. For example, when we are designing at the same time, I build a new model and click “upload”, then my workmate can click a “update” button to add the new model to his opening file. Thank you.


(Nathan 'jesterKing' Letwory) #4

You probably could use any of the existing supported text-based file formats like fbx, obj, dae. Script the export for that, then interface with your database to commit that - and vice versa.

Do you know how to program?


#5

maybe this helps: