Insert a file into current document c++

Hi All,

i’m developing a script for Rhinoceros and i need to insert a file into active document. I’m using C++.

I do not want to use the function RunScript ("_insert") but I need a function that I insert in the document all objects (individually) in the selected file without prompting the user if not only the file to open.

There is already a function that does these operations? If it exists, can you give me an example?

Thanks in advance.


Marco Brandazzi

Hi Marco,

If you need to create a block definition from an external file, then you will need to script Rhino’s Insert command, as there is no API to do this. The main reason is due to the complex file I/O (the Insert command allows you to pick files other than .3dm).

Hi Dale,

thank you for your response! I’ll see how I can do it.