private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "DXF (*.dxf)|*.dxf"; if (DialogResult.OK == dlg.ShowDialog()) { AnyCAD.Exchange.DxfReader reader = new AnyCAD.Exchange.DxfReader(); renderView.ClearScene(); AnyCAD.Exchange.ShowShapeReaderContext context = new AnyCAD.Exchange.ShowShapeReaderContext(renderView.SceneManager); context.NextShapeId = mBeginId; if (reader.Read(dlg.FileName, context, false)) { renderView.RequestDraw(); mEndId = context.NextShapeId; } } renderView.View3d.FitAll(); }