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(); } }
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(); } }
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); }