示例#1
0
 public void PurgeAllOnBlockTable(Database db) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt => Wrappers.PurgeSymbolTable <BlockTable>(bt)));
示例#2
0
 public void AddAttributeToBlocks(Database db, Predicate <BlockReference> shouldAddAttribute, string attributeTag, string attributeDefaultValue) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(bt, modelSpace =>
                                                                                                           Wrappers.AddAttributeToBlocks(bt, tr, modelSpace, shouldAddAttribute, attributeTag, attributeDefaultValue))));
示例#3
0
 public void AdjustAttributeAlignmentsInDatabase(Database db) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnBlockReferences(tr, bt, Wrappers.AdjustAttributeAlignments, OpenMode.ForWrite)));
示例#4
0
 public void ExecuteActionOnAttributeReferences(string fileName, Action <AttributeReference> action, bool saveFile = true) =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnBlockReferences(tr, bt, (tran, br) =>
                                                                            Wrappers.ExecuteActionOnAttributeReferences(br, action)), saveFile);
示例#5
0
 public void ExecuteActionOnModelSpace(string fileName, Action <Transaction, BlockTableRecord> action) =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnModelSpace(tr, bt, action.Invoke));
示例#6
0
 public void AdjustAttributeAlignmentsInFile(string fileName) =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnBlockReferences(tr, bt, Wrappers.AdjustAttributeAlignments, OpenMode.ForWrite));
示例#7
0
 public void ExecuteActionOnBlockReferences(Database db, Action <Transaction, BlockReference> action, bool executeOnAnonymousBlocks = true) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, (tran, bt) =>
                                                                        Wrappers.ExecuteActionOnBlockReferences(tran, bt, action, executeOnAnonymousBlocks: executeOnAnonymousBlocks)));
示例#8
0
 public void ExecuteActionOnBlockReferences(string fileName, Action <Transaction, BlockReference> action, bool saveFile = true) =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnBlockReferences(tr, bt, action), saveFile);
示例#9
0
 public void ExecuteActionOnEntities <T>(Database db, Action <T> action, Predicate <T> predicate) where T : Entity =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(tr, bt, (tran, ms) =>
                                                                                                           Wrappers.ExecuteActionOnItemsInModelSpace(tr, ms, action, predicate))));
示例#10
0
 public void ExecuteActionOnEntities <T>(string fileName, Action <T> action, Predicate <T> predicate) where T : Entity =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnModelSpace(tr, bt, (tran, ms) =>
                                                                       Wrappers.ExecuteActionOnItemsInModelSpace(tr, ms, action, predicate)));
示例#11
0
 public void ExecuteActionOnBlockTable(Database db, Action <Transaction, BlockTable> action) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, action));
示例#12
0
 public void FixAttrMover(Database db) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(bt, Wrappers.FixAttrMover)));
示例#13
0
 public void ExecuteActionOnModelSpace(Database db, Action <BlockTableRecord> action) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(bt, action)));