using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;
using System.Windows.Forms;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
using Application = Autodesk.AutoCAD.ApplicationServices.Application;
using Document = Autodesk.AutoCAD.ApplicationServices.Document;
[assembly: CommandClass(typeof(Cheng5276_CAD.Class1))]
namespace Cheng5276_CAD
{
public class Class1
{
public void doc_ImpliedSelectionChanged(object sender, EventArgs e)
{
Autodesk.AutoCAD.EditorInput.Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
PromptSelectionResult pkf = ed.SelectImplied();
if (pkf.Status != PromptStatus.OK)
{ //取消选择状态
return;
}
else
{ //对象选择状态
ObjectId[] objIds = pkf.Value.GetObjectIds();
Document doc = Application.DocumentManager.MdiActiveDocument;
Transaction trans = doc.TransactionManager.StartTransaction();
foreach (ObjectId objId in objIds)
{