Plotter - Object Id's Vector-directions SVG's

I’m preparing files for a “cutting plotter”. 2d lines and polylines only.
I would like to change object Id’s To choose the order in which they are exported to SVG.
And Ideally the lines direction (start point of a line).
Is there a method for this?

Hi -

You didn’t categorize your post - are you asking for scripting methods?
In plain Rhino, you’d be looking into the order in which the objects were created and, perhaps, the dir command to set the direction.

It might be problem with a scripting solution.
The “direction” command solves my second problem. Thank you?
Now I just need an “order” command or a workaround for one?

Well, you would first need to determine the order you would like the curves in the file. Then, loop through the list of the objects in that order, copy in place, match the original object attributes (color, layer, etc.), then delete the original. Like that the object table will be in the chronological order you want. Then Export. However, I don’t know how .svg Export actually collects the objects… so it might not work. It’s also possible that you will need to reverse the order…

Instead of changing the Object ID, you could define the order in whatever way you want and add either a name with an increasing number or a user attribute.

You can do the sorting and referencing in Grasshopper with Elefront and also export with Elefront.

A test file with one named hatch in it: (6.9 KB)
export_svg.3dm (42.5 KB)

And the exported SVG:


Thank you Martin, that looks like a terrific suggestion.
I can’t get your attachments to install. (because I’m on Rhino 6, I think.)
but your advice is great.