Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is this correct?
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.ForRead) as BlockTable;
foreach (ObjectId objId in bt)
{
BlockTableRecord btr = objId.GetObject(OpenMode.ForRead) as BlockTableRecord;
foreach (ObjectId btrObjId in btr)
{
Entity ent = btrObjId.GetObject(OpenMode.ForRead) as Entity;
if (ent is Wipeout)
{
ent.UpgradeOpen();
{
ent.Erase();
}
}
}
}
}
tr.Commit();
}
}
}
"Very funny, Scotty. Now beam down my clothes.
Solved! Go to Solution.

