新开一张图,创建一个圆的块,选择块创建一个1*1的阵列。那么CAD创建了哪些对象,通过ARXDBG分析如下:
AcDbBlockReference,句柄282,名称c,阵列之前的块 AcDbBlockTableRecord,句柄284,名称*U3 AcDbBlockBegin,句柄285,AcDbBlockEnd,句柄286,包含28B AcDbBlockTableRecord,句柄287,名称*U4 AcDbBlockBegin,句柄288,AcDbBlockEnd,句柄289,包含29A AcDbBlockReference,句柄28A,名称*U4,阵列之后的块 AcDbBlockReference,句柄28B,名称c,*U3的块内实体 AcDbDictionary,句柄28D,名称ACAD_ASSOCNETWORK,ModelSpace的词典 AcDbAssocNetwork,句柄28E,上级句柄28D,关联28F AcDbDictionary,句柄28F,名称ACAD_ASSOCNETWORK,Database的词典 AcDbAssocNetwork,句柄290,上级句柄28F,关联28D AcDbAssocAction,句柄291,上级句柄28E,记录AlignItems,AxesAngle,ItemSpacing,Items,LevelSpacing,Levels,RowElevation,RowSpacing,Rows等信息 AcDbAssocArrayActionBody,句柄292,上级句柄291,关联29A AcDbAssocVertexActionParam,句柄293,上级句柄291 AcDbAssocVertexActionParam,句柄294,上级句柄291 AcDbAssocDependency,句柄295,上级句柄291,关联287 AcDbAssocDependency,句柄296,上级句柄291,关联284 AcDbAssocDependency,句柄297,上级句柄291,关联28A AcDbAssocVertexActionParam,句柄298,上级句柄291 DictionaryVariables,句柄299,未知 AcDbBlockReference,句柄29A,名称*U3,*U4的块内实体
可以看出阵列之后的原块查找路径,U4的BlockReference->U4的BlockTableRecord->U3的BlockReference->U3的BlockTableRecord->c的BlockReference。
替换块后
AcDbBlockTableRecord,句柄2A1,名称*U6 AcDbBlockBegin,句柄2A2,AcDbBlockEnd,句柄2A3 AcDbBlockReference,句柄2A4,名称l,*U6的块内实体 AcDbAssocAction,句柄2A5 AcDbAssocArrayModifyActionBody,上级句柄2A5,句柄2A6 AcDbAssocDependency,句柄2A7,上级句柄2A5,关联287 AcDbAssocDependency,句柄2A8,上级句柄2A5,关联2A1 AcDbAssocVertexActionParam,句柄2A9,上级句柄2A5 AcDbLayerTableRecord,句柄2AA,名称*ADSK_ASSOC_ENTITY_BACKUPS AcDbBlockReference,句柄2AB,名称*U3 *U4增加了包含2AB,29A从*U3->*U6
实际上原来块还在,只是隐藏。