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?
// 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
}
Thanks for your example, it worked great for importing many file types. However, I noticed that when trying to importing .3dm files using your example, the UI prompts user for a import scale (as shown below). Is importing rhino files headlessly not supported yet?
This should work in Rhino 7 if you use the RhinoDoc.CreateHeadless(null)
function to create your doc. The SVG importer will not prompt for input when the doc is “headless”