How to clear screen before drawing

Hi there,

I am trying to clear the screen before I draw my object so that every time I update my script the old display geometry is cleared and redrawn

Below is the script I want to add to run and be able to clear the screen every time before the geometry is redrawn.

      Line normalLine = new Line(new Point3d(0,0,0), new Point3d(0,0,10));
      var attribs = doc.CreateDefaultAttributes();
      attribs.ObjectDecoration = Rhino.DocObjects.ObjectDecoration.EndArrowhead;
      doc.Objects.AddLine(normalLine, attribs);

not sure how to go about this. any suggestions ?

Hi @moo,

What does “clear” mean? You want to delete all exising objects in the document?

– Dale

Hi Dale,

yes that’s right, I want to delete all objects in the document