Select a Text from AutoCAD and to Display in C# windows forms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear All,
Season greetings to all experts,
with respect to above subject,
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.Interop;
privatevoid button2_Click(object sender, EventArgse)
{
AcadApplication AcadApp = new Autodesk.AutoCAD.Interop.AcadApplication();
AcadDocument doc1 = AcadApp.Documents.Open("c:\\test.dwg");
AcadApp.Visible =true;
AcadApp.ZoomExtents();
double[] startPoint = newdouble[3];
double[] endPoint = newdouble[3];
startPoint[0] = 0; startPoint[1] = 0; startPoint[2] = 0;
endPoint[0] = 20; endPoint[1] = 20; endPoint[2] = 0;
AcadSelectionSet ssetObj = AcadApp.ActiveDocument.SelectionSets.Add("ss1");
ssetObj.Select(Autodesk.AutoCAD.Interop.Common.
AcSelect.acSelectionSetCrossingPolygon,startPoint,endPoint,Type.Missing, Type.Missing);
}
the idea is to select the AutoCAD text by crossingPolygon and then to display the selected text in the C# windows form label1.text.
Could you please help for this above request.
Thanks in Advance.
regards,
Micky.