Такой пример подойдет?
void MyOwnWblock()
{
ads_name sset;
int i;
long length;
AcDbObjectIdArray outObjIds;
AcDbDatabase* pOutputDb;
AcGePoint3d basePoint(0.0, 0.0, 0.0);
AcDbDatabase* dwg = acdbHostApplicationServices()->workingDatabase();
AcDbObjectIdArray objList;
if (acedSSGet(NULL, NULL, NULL, NULL, sset) != RTNORM) {
acutPrintf("\nА почему ничего не выбрал?");
goto m_end;
}
acedSSLength(sset, &length);
for (i = 0; i wblock(pOutputDb, outObjIds, basePoint);
pOutputDb->saveAs("xxx.dwg");
m_end:;
}