Delete all objects on Rhino workspace

Hi all,

I want to do some simulation on Rhino, so I want to delete all objects on the workspace after every iteration.

Please, How can I do this?

Thanks

Use the clear method of the object table:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_FileIO_CommonComponentTable_1_Clear.htm

RhinoDoc.ActiveDoc.Objects.Clear()

Thanks, but I am working with Python scripting on Rhino. I couldn’t import the RhinoDoc

import scriptcontext as sc

sc.doc.Objects.Clear()

Should do it.
Not on a computer right now so capitalization of the methods might be off…

2 Likes