コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: xazk027/anycadnetsdkpro
        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();
        }