namespace BCCDELWIPOUT
{
public class DraftingTools
{
[CommandMethod("BCC:WOUT")]
public static void BCCDELETEWIPOUT()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Transaction tr = db.TransactionManager.StartTransaction();
using (tr)
{
BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
foreach (ObjectId objId in bt)
{
BlockTableRecord btr = objId.GetObject(OpenMode.ForWrite) as BlockTableRecord;
foreach (ObjectId btrObjId in btr)
{
Entity ent = btrObjId.GetObject(OpenMode.ForWrite) as Entity;
if (ent is Wipeout)
{
ent.Erase();
}
}
} tr.Commit();
}
}
}
}
cad.net删除wipeout,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/swtool/p/3832330.html