Programmatic/Scripted Access to Import_SVG Plugin

Is it possible to use the functionality of the Import SVG Plugin in a C# context? I’ve tried referencing the RHP and poked around a bit… I see almost all the classes are internal/protected/private.

Ideally I’d like to go straight from an SVG file to a collection of Geometry (or maybe RhinoObjects) without importing them into the active rhinodoc… any chance this is possible?

This should be possible in the Rhino 7 WIP.

// create a headless doc and import
using(var doc = RhinoDoc.New(null))
{
  doc.Import("my_path_to_svg.svg");
  // copy objects out of Document.Object table for use later
}
2 Likes