By Adam Nagy
I have an Autodesk.Navisworks.Api.Controls.ViewControl in my .NET application and would like to create a snapshot of the current view and save it to a bitmap.
You could simply use the .NET Framework to achieve that.
private void buttonSnapShot_Click(object sender, EventArgs e)
Bitmap bmp = new Bitmap(
Graphics graphics = Graphics.FromImage(bmp);
// If you are stepping through the code and the debugger
// (or anything else) is in front of the ViewControl,
// then that will be captured instead
viewControl.PointToScreen(new Point(0, 0)),
new Point(0, 0),
new Size(bmp.Width, bmp.Height));