Ejemplo n.º 1
0
            public void findandLink()
            {
                ObjectIdCollection Lines = tr.getAllObjectsWithDic("DIMINC_LINE");

                foreach (ObjectId id in Lines)
                {
                    DimMod = new DimInc_Modified();
                    Transaction trans = tr.start_Transaction();
                    DBObject dbObj = trans.GetObject(id, OpenMode.ForRead) as DBObject;
                    ObjectId dic = dbObj.ExtensionDictionary;
                    DBDictionary dbDic = (DBDictionary)trans.GetObject(dic, OpenMode.ForRead);
                    string tag = "";
                    Xrecord xRec = (Xrecord)tr.AC_Tr.GetObject(dbDic.GetAt("DIMINC_LINE"), OpenMode.ForRead, false);
                    foreach (TypedValue tv in xRec)
                    {
                        tag = tv.Value.ToString();
                    }
                    ObjectId texts = tr.getGroupWithTag(tag);

                    //LINK WITH THE MOD CLASS
                    DimMod.Add_Events(id, texts);
                    trans.Commit();
                    trans.Dispose();
                }
            }
Ejemplo n.º 2
0
            public void findandLink()
            {
                ObjectIdCollection Lines = tr.getAllObjectsWithDic("DIMINC_LINE");

                foreach (ObjectId id in Lines)
                {
                    DimMod = new DimInc_Modified();
                    Transaction  trans = tr.start_Transaction();
                    DBObject     dbObj = trans.GetObject(id, OpenMode.ForRead) as DBObject;
                    ObjectId     dic   = dbObj.ExtensionDictionary;
                    DBDictionary dbDic = (DBDictionary)trans.GetObject(dic, OpenMode.ForRead);
                    string       tag   = "";
                    Xrecord      xRec  = (Xrecord)tr.AC_Tr.GetObject(dbDic.GetAt("DIMINC_LINE"), OpenMode.ForRead, false);
                    foreach (TypedValue tv in xRec)
                    {
                        tag = tv.Value.ToString();
                    }
                    ObjectId texts = tr.getGroupWithTag(tag);

                    //LINK WITH THE MOD CLASS
                    DimMod.Add_Events(id, texts);
                    trans.Commit();
                    trans.Dispose();
                }
            }
Ejemplo n.º 3
0
 public DimInc_Create(bool softInit)
 {
     if (softInit)
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
     }
     else
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT PREVIEW CLASS
         preview = new DimInc_Preview(tr, DIMset);
         //INIT MOD CLASS
         DimIncMod = new DimInc_Modified();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
         //INIT POINTS AND TEXT ARRAY
         Points   = new List <Point3d>();
         DIMtexts = new ObjectIdCollection();
         GUID     = Guid.NewGuid().ToString();
     }
 }
Ejemplo n.º 4
0
 public DimInc_Create(bool softInit)
 {
     if (softInit)
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
     }
     else
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT PREVIEW CLASS
         preview = new DimInc_Preview(tr, DIMset);
         //INIT MOD CLASS
         DimIncMod = new DimInc_Modified();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
         //INIT POINTS AND TEXT ARRAY
         Points = new List<Point3d>();
         DIMtexts = new ObjectIdCollection();
         GUID = Guid.NewGuid().ToString();
     }
 }