Clear Rendered Graphics from Model

Clear Rendered Graphics from Model

Craig.Windram
Contributor Contributor
604 Views
3 Replies
Message 1 of 4

Clear Rendered Graphics from Model

Craig.Windram
Contributor
Contributor

I have a model where I have rendered spheres at coordinate points from a SQL database table that show crash data on a clients road bridge area model.  How can I clear the spheres when I have finished viewing them?  There are hundreds of them and I wish to de-clutter the model improve its performance.

0 Likes
605 Views
3 Replies
Replies (3)
Message 2 of 4

garylzimmer
Enthusiast
Enthusiast

Did you ever figure this out? I'm trying to solve the same issue!

0 Likes
Message 3 of 4

Craig.Windram
Contributor
Contributor

No joy with this yet.  I have another application where I am creating spheres to show a point of interest in the model, the sphere disappears as soon as I move the model, the same as redline markups do.  Everything indicates the use of identical code, the only difference is that one is created en-mass from coordinates in a spreadsheet and the other from a mouse click.

0 Likes
Message 4 of 4

garylzimmer
Enthusiast
Enthusiast

It's not a perfect on/off switch for me yet, but I've gotten some results by calling base.Render(view, graphics) then calling a delayed render

 

        public override void Render(View view, Graphics graphics)
        {
			if (clearGraphics == true)
			{
				base.Render(view, graphics);
				Autodesk.Navisworks.Api.Application.ActiveDocument.ActiveView.RequestDelayedRedraw(ViewRedrawRequests.Render);
				clickedModel = null;
			}