zoukankan      html  css  js  c++  java
  • cad.net删除wipeout

    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();
                }
            }
        }
    }

  • 相关阅读:
    垂直渐变的Button
    winform下重画ListBox
    分享一个 C# Winfrom 下的 OutlookBar 控件的使用
    颜色下拉菜单(combox)
    Robot Framework 使用技巧 快捷键
    Batch 拷贝远程机器文件到本机指定目录下
    JMeter常用函数 使用图解
    SoapUI报ClientProtocolException错误
    Setup Script in SoapUI
    邮件自动回复
  • 原文地址:https://www.cnblogs.com/swtool/p/3832330.html
Copyright © 2011-2022 走看看