Clearing the context

Hey,

I’d like to remove all objects in the current context, is that possible?
Using Rhino 5 and C++.

Thanks in advance!
Best regards

Why? Does this including remove resources such as layers, linetypes, dimension styles, etc.?

The reason behind this is the following, the user uses our functions to create a cube e.g. We save the info on the cube in the background and would like to generate a nurbs object out of it, which works just fine. The only problem is that we haven’t found a method to remove the existing object(s) from the context.

If you’ve added an object to the document and you want to delete it, then use CRhinoDoc::DeleteObject. Is this what you are looking for?