Export Geometry from world and layout space?

Exporting parts of a rhino file via scripting works well:

rs.SelectObjects(obs)
rs.Command("-export C:\\test.3dm enter")

But how can I export a layout and its elements as well?
Just selecting the elements on the layout too did not work.

Would I have to build up the Rhino file table by table via the File3dm class ?

see also Export layout with selected geometry to a .dwg

Hi @Goswin,

Does this mean the details and the model space objects in these details?

– Dale

@dale yes, I want to export some objects from model space and some objects from a layout space. Basically a drawing in model space and a header in layout space with a detail view onto the model space

Hi @Goswin,

This is not a capability of Rhino. It’s probably easier to just open the file and remove all the layouts you don’t want.

– Dale

@dale that doesn’t sound ideal. I have a large model of a building with many facade panels. I am exporting a drawing for the manufacturing of each panel as pdf. along with that I would like to have a rhino file that would allow me to make some small individual manual revisions and reprint. So that would be just one panel in model space, some dimension lines, a layout with a detail view and some header text. It would be nice to have a method that just takes a list of object GUIDs (from model and layout space) and layout GUIDs and makes a 3dm file from those, taking care of the layer table, dim styles and other tabels automatically. Could I do that via the File3dm class ?

Hi @Goswin,

I’ve added your comments to a issue we already have in our system:

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

Since the scope of your export wish is limited (no materials, textures, linked blocks, etc.), then there is a good chance you can do this with File3dm or just by creating a headless document. But without having tried, I don’t know where the road blocks are.

– Dale

Thanks @dale , what is a „headless document“ ?

@Goswin you can create a headless document, i.e a document that you cannot see opening. You can then manipulate it and close it without any UI items.

You can also use File3dm which has more layout view access in my experience.