Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5791

How to clear screen before drawing

$
0
0

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;
      Clear();
      doc.Objects.AddLine(normalLine, attribs);
      doc.Objects.AddPoint(centroid);
      doc.Views.Redraw();

not sure how to go about this. any suggestions ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5791

Trending Articles