コード例 #1
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 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))));
コード例 #2
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 public void ExecuteActionOnModelSpace(string fileName, Action <Transaction, BlockTableRecord> action) =>
 Wrappers.ExecuteActionOnBlockTable(fileName, (tr, bt) =>
                                    Wrappers.ExecuteActionOnModelSpace(tr, bt, action.Invoke));
コード例 #3
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 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))));
コード例 #4
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 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)));
コード例 #5
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 public void FixAttrMover(Database db) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(bt, Wrappers.FixAttrMover)));
コード例 #6
0
ファイル: AutoCadWrapper.cs プロジェクト: JieGou/jszomorCAD
 public void ExecuteActionOnModelSpace(Database db, Action <BlockTableRecord> action) =>
 Wrappers.ExecuteActionInTransaction(db, tr =>
                                     Wrappers.ExecuteActionOnBlockTable(db, tr, bt =>
                                                                        Wrappers.ExecuteActionOnModelSpace(bt, action)));