示例#1
0
 public void Dispose()
 {
     AC_Tr.Commit();
     AC_blockTable.Dispose();
     AC_blockTableRecord.Dispose();
     AC_Tr.Dispose();
 }
示例#2
0
 public void closeObject(Entity Obj)
 {
     Obj.Dispose();
     AC_Tr.Commit();
     AC_blockTable.Dispose();
     AC_blockTableRecord.Dispose();
     AC_Tr.Dispose();
 }
示例#3
0
 public void Dispose()
 {
     if (!AC_blockTable.IsDisposed)
     {
         AC_blockTable.Dispose();
     }
     if (!AC_blockTableRecord.IsDisposed)
     {
         AC_blockTableRecord.Dispose();
     }
     if (!AC_Tr.IsDisposed)
     {
         AC_Tr.Commit();
         AC_Tr.Dispose();
     }
 }
示例#4
0
        //GET FUNCTIONS/////////////////////////////////////////////////////////////////////////////////

        public ObjectId getGroupWithTag(string tag)
        {
            start_Transaction();
            DBDictionary gd = openGroupDictionary(OpenMode.ForRead);

            if (gd.Contains(tag))
            {
                AC_Tr.Commit();
                AC_Tr.Dispose();
                return(gd.GetAt(tag));
            }
            else
            {
                AC_Tr.Commit();
                AC_Tr.Dispose();
                return(ObjectId.Null);
            }
        }
示例#5
0
        public ObjectIdCollection getAllObjectsWithDic(string searchPath)
        {
            ObjectIdCollection objs = new ObjectIdCollection();

            start_Transaction();
            AC_Db = AC_Doc.Database;
            openBlockTables(OpenMode.ForRead, OpenMode.ForRead);
            foreach (ObjectId id in AC_blockTableRecord)
            {
                DBObject dbObj = AC_Tr.GetObject(id, OpenMode.ForRead) as DBObject;
                ObjectId dic   = dbObj.ExtensionDictionary;
                if (dic != ObjectId.Null)
                {
                    DBDictionary dbDic = (DBDictionary)AC_Tr.GetObject(dic, OpenMode.ForRead);
                    if (dbDic.Contains(searchPath))
                    {
                        objs.Add(id);
                    }
                }
            }
            AC_Tr.Dispose();
            return(objs);
        }
示例#6
0
 public void end_Transaction()
 {
     AC_Tr.Commit();
     AC_Tr.Dispose();
 }