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 void newDIMinc()
            {
                start_DIMline();
                index = 1;
                while (true)
                {
                    if (!askforPoint())
                    {
                        break;
                    }
                    update_DIMline(index);
                    if (!create_DIMtxt(index))
                    {
                        break;
                    }
                    ;
                    index++;
                }
                ObjectOverrule.RemoveOverrule(RXObject.GetClass(typeof(Entity)), preview._osOverrule);
                ObjectId textsGroup = createTextGroup(DIMtexts);

                AddExtensionDictionary(DIMline);

                DimIncMod.Add_Events(DIMline, textsGroup);
            }