sanmak 发表于 2006-9-15 15:55:00

arx .net 中如何遍历被删除的图形?

BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);
                BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt, OpenMode.ForRead,true);
                foreach(ObjectId id in btr)
                {
                  Entity ent = trans.GetObject(id, OpenMode.ForWrite, true) as Entity;
                  
                  if (ent == null)
                        continue;
                }
                btr.Dispose();
            }
            catch(Exception e)
            {
            }
            finally
            {
                trans.Dispose();
            }
本想在此段代码中能遍历当前图形中所有的实体(包括已被删除的实体)。但被删除的实体无法找到。
请高手指点。
页: [1]
查看完整版本: arx .net 中如何遍历被删除的图形?