Export only selected objects

Hello! I am still seeing this behavior in Rhino 7 (via C#/Rhinocommon API… e.g. RunScript). When I select a strict subset of items and export selected, I get everything visible included in the output, not just the selection. Is this bug still at large?

Hi -

That bug was fixed.
I’ve moved this post to a new thread as the other thread and RH-37833 did not involve any scripting.
You might want to post the relevant parts of your script so that your issue can be reproduced.

Thanks Wim.
I’m working on a component that will export some geometry to a set of separate svg files. If I use the menu option File >> Export Selected, I get just the selected geometry in the resulting svg file, as intended. But since I’m trying to automate this, I use the following code to iteratively select different geometry, export selected, then deselect all. But then every resulting file behaves like I exported the entire document, not just the selection. My code is living in a simple C# script component for now. Say A and B are sets of input curves passed as their Guids.

private void RunScript(List<Guid> A, List<Guid> B, bool export, string filepath)
    if(export) {

      foreach(Guid id in A) {
      RhinoDoc.ActiveDoc.ExportSelected(filepath + "A.svg");

      foreach(Guid id in B) {


I tried replacing RhinoDoc.ActiveDoc with RhinoDocument, and I also tried replacing these ActiveDoc methods with simple script macro calls like

RhinoApp.RunScript("-_Export \"" + filepath + "A.svg\"", true);

Am I misusing something?
example.3dm (45.1 KB)
example.gh (11.5 KB)

I’m on Rhino 7.12 for Windows. Let me know if I can do anything else to help reproduce the issue!

Anyone have an idea why this might be happening?

Hi @Casey,

See of this is helpful.

test_export_svg.gh (2.1 KB)

– Dale