Dim ed As Editor = AcadApp.DocumentManager.MdiActiveDocument.Editor Dim db As Database = AcadApp.DocumentManager.MdiActiveDocument.Database Using trans As Transaction = db.TransactionManager.StartTransaction() Dim brf As BlockReference = trans.GetObject(id, OpenMode.ForRead) Dim btr As BlockTableRecord = trans.GetObject(brf.BlockTableRecord, OpenMode.ForRead) Dim obc As ObjectIdCollection = btr.GetBlockReferenceIds(False, False) Return obc
brf代表构成块的某一个块参照,以上语句意思应该是列出了所有brf的兄弟了吧,而在我的图形中,brf都是已构成块的块参照形式存在,没有独立块参照的形式存在,所以我现在需要得到她的父亲块参照ID |