Delete a CRhinoBrepObject from a doc

Dale,

We add a CRhinoBrepObject to a doc with the following code. Could you show us how to remove the CRhinoBrepObject from the doc?

CRhinoBrepObject* pBrepObject = new CRhinoBrepObject();
pBrepObject->SetBrep(prnBrep);
m_pDoc->AddObject(pBrepObject);
m_pDoc->Redraw();

I’m not Dale, but the function you’re looking for is CRhinoDoc::DeleteObject (documentation)

~robin