private void OKbtn_Click(object sender, EventArgs e) { Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; string xx = ""; if (TextradioButton.Checked) { xx = "Text"; } else if (MtextradioButton.Checked) { xx = "MText"; } else if (HatchradioButton.Checked) { xx = "Hatch"; } else if (DimradioButton.Checked) { xx = "Dim"; } else if (BlockradioButton.Checked) { xx = "Insert"; //BlockReference } //bool laylq = LayercheckBox.Checked; //bool collq = ColorcheckBox.Checked; //bool blocklq = BlocknamecheckBox.Checked; TypedValue[] values = new TypedValue[] { new TypedValue((int)DxfCode.Start, xx) }; SelectionFilter filter1 = new SelectionFilter(values); PromptSelectionResult pst = ed.GetSelection(filter1); SelectionSet ss = pst.Value; ss.HighlightEntities(); }