将几个实体对象变成一个块
CString blockName = _T("建北图元");
AcDbBlockTable *pBlkTab;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlkTab, AcDb::kForWrite);
AcDbBlockTableRecord *pBlkTabRcd;
pBlkTabRcd = new AcDbBlockTableRecord();
pBlkTabRcd->setName(blockName);
AcDbObjectId blockId;
pBlkTab->add(blockId, pBlkTabRcd);
pBlkTab->close();
pBlkTabRcd->appendAcDbEntity(p1);
pBlkTabRcd->appendAcDbEntity(p2);
pBlkTabRcd->appendAcDbEntity(p3);
p1->close();
p2->close();
p3->close();
AcDbBlockReference *pBlkRef = new AcDbBlockReference(ptInsert, blockId);
AcDbObjectId idXdata=CDwgDatabaseUtil::PostToModelSpace(pBlkRef, m_pDatabase);
pBlkTabRcd->close();