Using (Transaction tr = ())īlockTable bt = (BlockTable)tr.GetObject(targDb.BlockTableId, OpenMode.ForRead) īlockTableRecord ms = (BlockTableRecord)tr.GetObject(bt, OpenMode.ForRead) Įntity ent = (Entity)tr.GetObject(id, OpenMode.ForRead) Ī.ObjectId asId = .GetFilerObjectId(new .ObjectId(id.OldIdPtr), false) Ī asObj = .Open(asId) ĭebug. ![]() Private static bool EraseTargDbOldObjects_DoesNotWork(Database targDb)Ī.LockCurrentDocument() Ī asTr = .StartTransaction() But, when the database is opened as a side database and the items are deleted, they are brought back on layer '0' when an audit is performed. rex skeleton named 'TRX-293 TRINITY Tyrannosaurus,' measuring 11.6 meters long and 3. As long as the Document is opened in the editor, entities are deleted without issue. After running the code below, entities are regenerated during a drawing audit. ![]() Unfortunately, I still haven't had success. Code should work if you use it inside of an Advance Steel transaction that you commit.
0 Comments
Leave a Reply. |