zoukankan      html  css  js  c++  java
  • 不用遍历得到btr中同一类型的实体 CAD2009 vs2008及以上

                  var dict =
                        from ObjectId id in btr
                        group id by id.ObjectClass.DxfName;

                    foreach (var ids in dict)
                    {

                        switch (ids.Key)
                        {
                            case "LINE":
                                foreach (var id in ids)
                                {
                                    Entity ent = id.GetObject(OpenMode.ForWrite) as Entity;
                                    ent.ColorIndex = 1;
                                }
                                break;
                            case "CIRCLE":
                                foreach (var id in ids)
                                {
                                    Entity ent = id.GetObject(OpenMode.ForWrite) as Entity;
                                    ent.ColorIndex = 3;
                                }
                                break;
                        }
                    }

                    tr.Commit

  • 相关阅读:
    欧拉公式求四面体的体积
    欧拉公式求四面体的体积
    I
    I
    闭包传递(floyed)
    闭包传递(floyed)
    Python hypot() 函数
    Python cos() 函数
    Python atan2() 函数
    Python atan() 函数
  • 原文地址:https://www.cnblogs.com/houlinbo/p/1647728.html
Copyright © 2011-2022 走看看