Hi,
I am new to Auto CAD, and I am a C#.Net developer, one of my project requirement is
1. Need to Open a .dwg or .dxf file and show the drawing in windows form or asp form with properties like Pan, Zoom In, Zoom Out, Single Entity Selection or Multiple Entities Selection( Window Selection with Mouse Drag).
2.If User Selects a group of entities by mouse drag (window selection), i need the text available in that selected window in a table format, which i can save or manipulate
Was this achievable by using CAD.Net tool, if possible please provide a sample code for testing.
Thanks & Regards,
Narendra
How to select and edit group of entities using C#.Net
Moderators: SDS, support, admin
Re: How to select and edit group of entities using C#.Net
Hello Narendra,
CAD .NET library fulfils your requirements, it provides a ready-to-use CADEditorControl which supports the following features:
Mikhail
CAD .NET library fulfils your requirements, it provides a ready-to-use CADEditorControl which supports the following features:
- Opening a .dwg or .dxf file and displaying the drawing in Windows Forms application.
- Panning (by holding the right mouse button), zooming in/out (by the mouse wheel or toolbar buttons).
- Single entity selection (by clicking the left mouse button), multiple entities selection (window selection).
- Storing the currently selected entities in a CADEntityCollection which can be accessed through a CADEditorControl.Image.SelectedEntities property.
Code: Select all
using System;
using System.Collections.Generic;
using CADImport;
...
List<CADEntity> cadTexts = cadEditorControl1.Image.SelectedEntities.FindAll(ent => ent.EntType == EntityType.Text);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support